Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Multiple repeating SubForms binding to the same data node

Avatar

Avatar
Level 1
Sirisha_Dinavah
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Sirisha_Dinavah
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
Sirisha_Dinavah
Level 1

28-02-2013

Having multiple repeating SubForms binding to the same data node : In our documents, many times we need to display information from same table in multiple locations. For example, if document displays information of Insureds on one page and information of drivers on another page, we need to create a LiveCycle document with two SubForms. Each SubForm needs to have a repeating binding to CommonInsured element in XSD.  LiveCycle Designer is not able to handle such case. We cannot have two subforms bound to the same node, ONLY in a case where repeating option is selected for data binding.

The only way I have found out is the following Javascript

//Get the data node from XML. You will find the code for this function in //JavaHelperFunctions library.

// InsuredDataRepeatingSubForm is a second subform.

//You need to manually add instances to this subform at the

//runtime and Insured data to each instance.

var insuArray = JavaHelperFunctions.getInsureds();

    var i=0;

    for( i=0; i<insuArray.length; i++)

    {

       if (i>0)

       {

var thesubform = this.InsuredDataRepeatingSubForm.instanceManager.addInstance(i);

              thesubform.InsuredName.rawValue = insuArray[i].fullName.value;

       }  

       else

       {

               this.InsuredDataRepeatingSubForm.InsuredName.rawValue = insuArray[i].fullName.value;

       }

    }

Is there any way I can achieve directly using bindings since we are trying to minimize javascript that changes the layout of the form?

Thanks in advance!

View Entire Topic

Avatar

Avatar
Validate 1
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile

Avatar
Validate 1
Level 2
past-tense
Level 2

Likes

9 likes

Total Posts

85 posts

Correct Reply

10 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Applaud 5
View profile
past-tense
Level 2

13-03-2013

Hey there,

I answered a similar question a while back. It's safe to ignore everything and just look at the answer Most of it was just me trying to work out what exactly the OP was asking for. Let me know if the linked answer spawns any questions.

- Scott