I'm quite new to LiveCycle and I'm editing quite a large form that somebody built previously. I've got essentially 2 forms, where we fill out a top form on our end (administrators), then hide and lock our 'registration form' and send it off to the end user. Now on the top form, I've created a repeatable table. I've got it to work that when you click 'Add account' on the top registration form, it also adds an instance of that same table on the lower form that the user sees. Essentially I just use the addInstance command to add an instance of each table when I click the button.
My trouble is that I can use data binding or a floating field to display the information entered in the top form in the bottom form, however I can only have either the first instance replicated, or obviously if I use global binding whatever I put in the first instance will repeat for all instances.
How can I get it so that the repeated form attaches a unique ID to each instance that is added, so that when I display the information from the table in the top form, it displays the same way in the lower form?
The row of the table has a index property which you can use as a unique ID, starts from 0 and increments by 1 for each row. So if the second table is all unbound you could have a calculate script to keep the cell values in sync. Something like;
So, sorry double reply to my own thread but I've at least surmised that the issue is the fact that my 2 tables are on 2 separate pages. So I've taken your examples code and broken the 2 tables apart over 2 pages, and confirmed the exact same thing happens. What seems to be happening is that the index for table 2 returns the value of 1, so of course each row in SecondTable.SecondRow.FirstName/LastName will returnwhatever value I enter for FirstName/:LastName in FirstTable.FirstRow.FirstName/LastName
Here is the code from your example, except I separated the tables by putting FirstTable on a page I named 'TestPage' and SecondTable on a subsequent page called 'TestPage2' to replicate what I have form my own form:
Thank you very much for the reply. That is exactly what I need, and I open your form and see how it works and it all makes sense! however when I apply it to my forms it still only displays the value from the first instance of table 1 for all instances of table 2. So if I add 3 rows to the top table, and make the values for the rows '1, 2, 3' when I scroll down to look at the second table, it still shows '1, 1, 1'...
Is this happening perhaps becuase the 2 tables are not contained within the same subform, or even the same page? This is how the code looks on my end: