Avatar

Level 2

Hi,

I have been trying to create a drop-down to dynamically populate a table based on what drop-down option is chosen. I can get it to work for adding a row at a time, which is fine, but I want to add text related to the chosen option to a field in the newly created row. I can get this to work using Row1.Field.rawValue = "blah blah blah" but when I want to get dynamic and call the row being created by using something like resolveNode I can't get anything to be entered into the field. Can this be done at all?

Here is my script:

==================

topmostSubform.Page1.tabletest.DropDownList2::exit - (JavaScript, client)

if (this.rawValue == 1) {

  Table4._Row1.addInstance()

  Page1.tabletest.Table4.Row1.Identity.rawValue = "Easement for Transmission Line"

  };

if (this.rawValue == 2) {

Table4._Row1.addInstance()

Page1.tabletest.Table4.resolveNode(Row1[Table4.Row1.instanceManager.count-1]).Identity.rawValue = "Easement for electricity and other purposes"

xfa.host.messageBox("Ausgrid");

};

===================

The first part, for this.rawValue == 1 works okay for one instance of adding. The second part, where I have tried to do a resolveNode, adds a row but does not enter any text.

Thanks in advance for your help with, and consideration of, this problem.

Cheers,

Greig

poulate_table_dynamically_from_drop_down.jpg