I have a dropdown list xfa.form.assessment.Questions.Questionset.Questiondetail.FIBdetail.qObjlist
That I want to populate with the text from all instances of the text field xfa.form.assessment.Objectives.objectivesdetail.objective.
The user determines how many instances of xfa.form.assessment.Objectives.objectivesdetail there will be.
How can I write the addItem for the dropdown list to grab the data from all the instances of xfa.form.assessment.Objectives.objectivesdetail?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
I tried to have the exit field of the objective texfield populate the dropdown items, but it didn't like it if the "Fill in blanks"was hidden. So I have the following javascript in the enter event of the "Fill in blanks" dropdown instead. This look back at the objectives and loops through them:
this.clearItems();
this.rawValue = null;
var nCount = Objectives.objectivesdetail.instanceManager.count;
console.println("nCount: " + nCount);
for (var i=0; i<=nCount; i++)
{
var vFld = xfa.resolveNode("Objectives.objectivesdetail[" + i + "]");
var vObj = vFld.objective.rawValue;
Questions.Questionset.Questiondetail.FIBdetail.qObjlist.addItem(vObj);
}
Views
Replies
Total Likes
Hi,
I tried to have the exit field of the objective texfield populate the dropdown items, but it didn't like it if the "Fill in blanks"was hidden. So I have the following javascript in the enter event of the "Fill in blanks" dropdown instead. This look back at the objectives and loops through them:
this.clearItems();
this.rawValue = null;
var nCount = Objectives.objectivesdetail.instanceManager.count;
console.println("nCount: " + nCount);
for (var i=0; i<=nCount; i++)
{
var vFld = xfa.resolveNode("Objectives.objectivesdetail[" + i + "]");
var vObj = vFld.objective.rawValue;
Questions.Questionset.Questiondetail.FIBdetail.qObjlist.addItem(vObj);
}
Views
Replies
Total Likes
This worked great! I used it in all the subforms:
this.clearItems();
this.rawValue = null;
var nCount = Objectives.objectivesdetail.instanceManager.count;
console.println("nCount: " + nCount);
for (var i=0; i<=nCount; i++)
{
var vFld = xfa.resolveNode("Objectives.objectivesdetail[" + i + "]");
var vObj = vFld.objective.rawValue;
this.addItem(vObj);
}
Thank you, thank you!
Views
Replies
Total Likes