Drop Down list maintenance in repeating rows???

Avatar

Avatar

chrisb29762052

Avatar

chrisb29762052

chrisb29762052

30-08-2015

I figured out how to update all my drop down lists from a table as long as the Drop Down list is not in a repeating row.   In this case it only apply to the Drop Down list of the first row.

I am using the click function of a button to apply my script.

I clear the Drop Down list with something like this:

Form51188_2013.MaintenancePage.Button3::click - (JavaScript, client)

Form51188_2013.Page_1.Dive_Particulars.CallReceivedBy.rawValue = null;

Form51188_2013.Page_1.Dive_Particulars.CallReceivedBy.clearItems();..........................etc

My code to load the info currently read :

var nName = xfa.resolveNodes("Form51188_2013.MaintenancePage.Table3.Row1[*].Name");

var cBox = xfa.resolveNodes("Form51188_2013.MaintenancePage.Table3.Row1[*].cPick");

for (var i=0; i<nName.length; i++)   

{

    for (var i=0; i<cBox .length; i++)

        if(cBox.item(i).rawValue === 1)

            {

                Form51188_2013.Page_1.Dive_Particulars.CallReceivedBy.addItem (nName.item(i).rawValue);

                Form51188_2013.Page_1.Dive_Particulars.AuthorizedBy.addItem (nName.item(i).rawValue);

                Form51188_2013.Page_1.Supervisors.Table2.Row2.Supervisors.addItem (nName.item(i).rawValue);

                Form51188_2013.Page_2.TeamBreifingSup.addItem (nName.item(i).rawValue);

                Form51188_2013.Page_4.DebreifSup.addItem (nName.item(i).rawValue);

                Form51188_2013.Page_4.ExhBy.addItem (nName.item(i).rawValue);

                Form51188_2013.Page_4.Table1.Row1.TeamDeBriefBy.addItem (nName.item(i).rawValue);

                Form51188_2013.topmostSubform.DiveLog.Table1.Row7.Cell7.addItem (nName.item(i).rawValue);

            }

}

everything work good to this point.

I tried  a loop to clear and hopefully load the info to the Drop Down list located in repeating row with no success as follow:

var nDList = xfa.resolveNodes("Form51188_2013.topmostSubform.DiveLog.Table1.DiverDetails[*].NameList")  // "DiverDetails" being the name of the row and "NameList" the name of the Drop Down list  to be updated.

var nDlist = xfa.resolveNodes("Form51188_2013.topmostSubform.DiveLog.Table1.DiverDetails[*].NameList");

for (var i=0; i<nDList.length; i++)   

                {

                Form51188_2013.topmostSubform.DiveLog.Table1.DiverDetails.NameList.rawValue = null;

                Form51188_2013.topmostSubform.DiveLog.Table1.DiverDetails.NameList.clearItems();

                }

Load with this:

var nName = xfa.resolveNodes("Form51188_2013.MaintenancePage.Table3.Row1[*].Name");

var cBox = xfa.resolveNodes("Form51188_2013.MaintenancePage.Table3.Row1[*].cPick");

var nDlist = xfa.resolveNodes("Form51188_2013.topmostSubform.DiveLog.Table1.DiverDetails[*].NameList");

for (var i=0; i<nName.length; i++)   

{

    for (var i=0; i<cBox .length; i++)

        if(cBox.item(i).rawValue === 1)

            {

               for (var i=0; i<nDList.length; i++)   

                {

                Form51188_2013.topmostSubform.DiveLog.Table1.DiverDetails.NameList.addItem (nName.item(i).rawValue);

                 }

             }

}

Some assistance please.

Accepted Solutions (0)

Answers (4)

Answers (4)

Avatar

Avatar

chrisb29762052

Avatar

chrisb29762052

chrisb29762052

01-09-2015

I want to thank you for your offer to assist on this issue. It is no longer required.

After another full day of research and many attempt I finally figured it out. I will post  my finding abit later.

Again , Thank you.

Avatar

Avatar

chrisb29762052

Avatar

chrisb29762052

chrisb29762052

31-08-2015

Be glad to. Do you have an email that I can send it to?

Avatar

Avatar

PDFGuru

Avatar

PDFGuru

PDFGuru

31-08-2015

Could you please share the sample form, i would try to help.

You can view my work on following blog:

Adobe PDF Forms