Is there a way to use scripting to get instance count from a table/repeating group in FlexiLayout or Document Definition? So that I don’t need to export table in Layout, or export table in Document Definition.
Get instance count from table/repeating group?????
Was this article helpful?
0 out of 0 found this helpful
Comments
3 comments
Its probably too late but you should be able to count the lines in DocDef. Basically you need to make the rule at the section level.
Basically pick a field on the table and use something like me.Items.Count
PS. I hate that I can't delete or edit(save edited) post on this forum.
I found this to be very important. If you put this code at the repeating group or field level, you get errors that the object doesn't exist. Let me add some sample script as well. The name of my Repeating Group in this case is "Codes"
if (Context.Field("Codes").Items.Count > 12)
{
Context.CheckSucceeded = false;
Context.ErrorMessage = "The system will only process up to 12 codes.";
}
Please sign in to leave a comment.