Question
In the document skill, there is a field called Line Count and it should be populated with the number of lines that are in the Line Items table. Is there a way to get a count of the lines from the table and populate the Line Count field with it?
Answer
- Create a field Line Count (data type set to Text):
-
Create an Advanced Script Rule for the field with the sample script as per below:
var myTable = Context.GetField("Line Items");
Context.GetField("Line Count").Value = myTable.Instances.length.toString(); -
Please note, that both the whole Line Items group and the Line Count field should be enabled in the rule settings:
-
The result is the following:
Comments
0 comments
Please sign in to leave a comment.