How to change the value of the specific column in the specific row of Line Items from the Advanced Script Rule?
I.e. there is the Line Items table, and it is required to change the value of the Article Number Vendor column in the 2nd row:
- Open the Document Skill in the editor.
- Right-click the column and go to the column settings:
- Click New Rule> Advanced Script Rule.
Please make sure the required fields are added to the script rule settings, and the Changed by the rule option is checked for the column that will be changed:
- The sample script would be:
var myTable = Context.GetField("Line Items");
if (myTable.Instances.length > 1) //making sure there exists the 2nd row
var tableField = myTable.Instances.GetChild("Line Items/Article Number Vendor");
tableField.Value = "some value"; //assign the value
The result is as follows: