Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The code below is place on the table onClick event to capture the selected row and then set .  The second line sets a field value on the main form (F_FieldB in this example) to the value of a field value in the selected table row.

...

Below is example of how to programmatically select a table row and a specific field value.  In this case we are setting the variable "result" to the value of F_SelectOne2 in table row 12. (arrays Arrays - which is what tables are - always start with 0, which means BO.F_Table1.get(1) will get the 2nd row.  This assumes you know which row to select.  If you do not  - you can use this technique inside a loop where you search for the table row.

Code Block
languagejs
var result = BO.F_Table1.get(21).F_FieldA.getValue() ; // where i= the row number in the table.
BO.F_FieldB.setValue(result);

...