Highlighted

Binding repeating subforms

Avatar

21-05-2008

Hello everyone,

I have a form that is pre-populating a repeating subform with some data from a database call in a previous step in my workflow. When the user views my form they are selecting a radio button, and entering text in a text field that is not pre-populated with the database data, but these user entered fields are within the repeating subform with the database data. Later on in the process a letter is generated based on the information pulled from the database, and the user selections/text entered. I now have a new requirement to allow the user who is filling in my form to be able to view how the letter will look prior to submitting the form (Im hiding/making visible a subform below my form with the letter. This is controlled with a button click). I cant seem to figure out a way to grab the entire repeating subform and pass all of its elements to another subform that has the same field names and hierarchy (grabbed from my letter), the layout on the page just looks a little different from the form to the letter. Ive tried setting up the binding between the two subforms, but cant get it to work. I have also tried setting up javascript in the calculate event on my second subform, and think this is probably the way it should be done, but I cant seem to figure out the syntax. Any assistance is greatly appreciated.

Replies

Highlighted

Avatar

Avatar

Robert_Hirst

Avatar

Robert_Hirst

Robert_Hirst

22-05-2008

I have a similar problem at the moment, although with a table rather than a repeating subform (operates in a similar manner).



I've tried setting up identical bindings on the second table, rows and fields as the first, but unlike simple with fields this doesn't seem to work. What happens when I do this is that the two tables do collect data into the same part of the schema, but when the form is saved and reopened, anything from the lower of the two tables is now shown in the first table.



I'll post back if I think of anything.
Highlighted

Avatar

Avatar

Robert_Hirst

Avatar

Robert_Hirst

Robert_Hirst

22-05-2008

Just did some initial testing which shows that changing the binding on the default row to elementName[0] instead of elementName[*] will cause a link between the two items bound to the schema, so perhaps scripting something to adjust the bound element indexes on the second repeating object may be possible.



Again will post back if I get working.
Highlighted