Answered
Not sure what I'm missing here, but real close, I'm hoping someone can help me over this "bump"
I have a repeatable subform in a Dynamic PDF form I'm building in LS 8.0, this function is working fine. What I want is to pass a value to a text box for each instance (1, 2, 3, etc.). I have this script that passes the value and is counting, but the value for each instance passes on to all the fields (so if I'm on 3rd instance, the text box shows 3 on all subforms added.
The script is as follows on the text box calcualte event (using Java):
var tableIndex = xfa.form.root.P1.subfrm_AllSubs.subFrm_ActionFollowUp.instanceManager.count
this.rawValue = tableIndex
Thanks in advance if someone can help me clear this up.
This sample from the LCD reference manual explains how to count all textfields in the form.
To access a specific field placed in a repeating subform you need the [] accessor.
As the index of form objects is 0-based you have use [0] to access the first instance of the object, [1] for the second, [2] for the third and so on...
xfa.resolveNode("Subform[1].TextField").rawValue = "this is the third instance";
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs