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

Bind the same nodeset to multiple subforms

jeh
Registered: Mar 11 2008
Posts: 4
Answered

We would like to bind the 'parent' node of a 'repeating nodeset' to multiple subforms in one template. When we tried this, the 1st subform had the data, but not the rest (looks like xml parsing issue..). Looked at the Global type but that doesn't seem to be an option for a complex type such as subForm (according to the doc we've read). If this is not possible in Designer Object binding, could XML Source be modified to achieve this or is there a 'better' solution?

In this example parentNode would be bound to multiple subforms in a template for display of childNode data in multiple places in PDF
data1>data2>

Thanks for your help! -jane

My Product Information:
LiveCycle Designer, Windows
sconforms
Expert
Registered: Jul 10 2007
Posts: 92
Jane (jeh),

If I understand correctly, you tried to bind the same repeating data node () to multiple repeating subforms on your form but found that only one of the repeating subforms actually displayed the data.This behaviour is a result of the way the data merging algorithm works. It's basically a greedy algorithm that will merge all the data that it can into the first subform that's found with the binding unless some condition prevents it from merging all of the data node instances, in which case the algorithm will then look for another subform with the same binding and will continue to merge-in the data and so on until all the instance data has been merged into the form.

This means that you could easily have 3 repeating subforms on 3 different pages, each bound to the same repeating data node (childNode[*]) where the first 2 subforms have a maximum occurrence of 10, for example, and the last has no maximum. The result, assuming you had at least 25 data items, would be 10 items merged into the first page, 10 on the second and the remaining 15 on the last page.

If you wanted the identical data in each repeatable subform, then you would have to use script to do that since you can't give a subform a "global" binding such that all subforms on the form with the same name would have the same instances.

To do this in script, you would create an Initialize script on the subform to which the first repeatable subform is parented and, using the [url=http://forms.stefcameron.com/category/instance-manager/]Instance Manager[/url] of the repeatable subform inside of it, you would be able to iterate through the instances. For each instance, you would extract the data and add new instances with the same data into the other repeatable subforms, elsewhere in the form.

Stefan Cameron obtained his bachelor's degree with Honors in Computer Science at the University of Ottawa and is a Computer Scientist working on Adobe's LiveCycle server products, in particular on LiveCycle Designer ES for the past 5 years.

suewhitehead
Registered: Jun 3 2008
Posts: 232
This is the same thing I would like to do, but am not sure I understand how to do it. Does anyone have a sample file showing this?
CODevGroup
Registered: Dec 4 2011
Posts: 1
Hello experts,

I faced exact same issue today. Great to find out that nothing is wrong with my form structure. Could any one of you please post/refer me to the sample script. I am very new to Designer and I haven't completely understood the solution yet.

What I have understood is as follows: Lets say I have SubForm1 assigned to nodeset1. And, I need to also assign subForm2 to nodeset1. So, on the initialize event of SubForm2, I should access the SubForm1 instance and extract the data from the instance. I should assign the extracted data to SubForm2. I will try to achieve this with my limited JavaScript knowledge so far but it would be very helpful if any of you could give me some direction.

Thanks in advance
Rutuja