These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Drop Down

krm240
Registered: Apr 17 2009
Posts: 95
Answered

Have a drop down that has values of 1-9 on the main form.
Each value has assigned text, of say one, two ...nine.

Tried
Main.Master.FullPage.ProjectStatus.rawValue = this.rawValue

This will update the current master page (with the 1), but not ALL master pages.
So I need a for loop to reference all Master pages

How do I ref the ProjectStatus field in All the masterPages?

next

How do I get the drop down value and the related text posted to this field ?
ie: Would like to update the Master page Text to "1-one"

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Hi,

a simple for loop to update a textfield on every instance of the masterpage looks like:

for (var i = 0; i < xfa.host.numPages; i++){var nMasterPages = xfa.resolveNode("Form1.#pageSet.MasterPage1[" + i + "]");nMasterPages.Subform1.TextField1.rawValue = xfa.event.newText;}

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

krm240
Registered: Apr 17 2009
Posts: 95
Many thanks
my final script (working) is as follows:
For others, My form is called 'Main', and I renamed the master page to 'Master'.
I also have multiple masterpages, with the one that I want updated called 'FullPage'

I placed this code in the change event of a drop down list
It will update a text field on a Master page to the selected value in the drop down.

for (var i = 0; i < xfa.host.numPages; i++)
{
var nMasterPages = xfa.resolveNode("xfa.form.Main.Master.FullPage[" + i + "]");
nMasterPages.ProjectStatus.rawValue = xfa.event.newText;
}

I used this to update a status field on the master.