I am having an issue with nested repeating subforms in LiveCycle Designer.
I have created a simple form with one repeating subform nested inside another repeating subform.
In Acrobat, I go ahead and enable one instance of the outer repeating subform, then instances of the inner repeating subform (the number doesn't matter), enable Reader Rights; then save the file and reopen it again in Acrobat.
Acrobat, for some reason, adds more instances of the subforms than were saved originally with the file. It has also cleared some of the values I entered. Can anyone help me figure out why it is doing this?
Appreciate the help. Thanks,
P.S. I can send the file to you if you like. I cannot seem to attach it here.
I think the reason is you activated the "repeat subform for each data item" option for the outer subform, which is not neccessary.
You only need to activate that option for that item that is really repeated not its parent objects.
Thanks for the reply, Radzmar.
Unfortunately, that isn't it. I have only activated the "repeat subform for each data item" option on the subforms that are actually repeating, which are two in this case, one inside the other. So for example:
Item (this is the outer repeating subform with repeat options activiated)
Product (container subform)
Row (this is the inner repeating subform with repeat options activated)
Everything is flowed except for the "Row" Item. Pagination is "Place: Following Parent" and "After: Continue Filling Parent." I can't think of anything else which could account for this strange behaviour.
Any extra help you could offer would be appreciated. I am going to try to rebuilt a block stupid simple example on a blank form to eliminate the possibility that my file is somehow corrupt.
Sorry, but I see no way to upload the file. How do I do that?
I can e-mail it to you directly, if you like, but I am unable to post it to a web server in order to post a link to it.
I checked your form and it's weird.
I could not find a spcific reason why it's adding new instanced of "Repeat1" everytime the form was saved and reopend.
Maybe something got mixed up in the XML source.
Anyway, I rebuild your form from scratch and the problem has gone... check your mail box!
I do not know what the problem was either. I have combed the XML for both docs line by line, tried a few things, but nothing seemed to fix the problem.
However, I went ahead and did (yet) another rebuild, but this time, reversing the order by which I created the repeating subforms, — i.e., created, coded, and tested the inner repeated subform first, then, wrapped all that in another subform (i.e., the outer repeating subform), which I then coded, — the problem seemed to go away for me.
I will recheck the XML to see if anything appears to be different. I will let you know if I find anything.
Have you ever come across the notion that the order in which you create nesting subforms makes a difference? Weird indeed!
Thanks for your help on this.
It don't think the order you create subforms matters.
Some problems may occur when you move objects by drag'n drop. This was my expirience with Designer ES (8.x) when I used it.
Okay, I've resolved this problem.
Both the nested subforms that are being repeated must be named differently, as do the subforms containing the buttons which control the repeating (i.e., that are doing the adding and removing). If either sets are named the same, strange behaviour ensues.
So Radzmar, when you rebuilt the form, you took the crucial step of leaving the button subforms unnamed. This made a difference. Had you named them the same, you would have seen the same problem I was experiencing. But thank you just the same for showing me that this could indeed work. (I was on the verge of abandoning the whole idea of nesting repeating subforms altogether.)
So, having them on different hierarchical levels is not sufficient. Perhaps having them on separate pages is sufficient to avoid problems, but I haven't tested that out. I normally like to keep the same names for simplicity when copying and coding repeating subforms on large forms, but I will definitely be uniquely naming everything going forward. Lesson learned!
I've spent HOURS+++ trying to find a solution a similar problem only to discover that the "field names" within a repeating subform must be unique (not just the subform itself). Case in point, when I had a subform containing 3 fields: TextField1, TextField1, TextField1, I ran into an issue where a new instance of the subform was created each time the form was opened and saved. VERY AGGRAVATING! However, by changing the names of each field within the subform, the issue was resolved!
NOTE: Considering, I needed to use that same subform in my form again, I made sure to give the subform #2 a unique name, as well as the fields within the subform. Doing so allowed me to keep the data binding of the subform set at 'Use name (...)'
I hope this info helps someone else in the near future.
Hello to all.
I add to this post because it concerns the same topic: problem for nested repeating subforms.
In my case, in my xsd I have a structure like this:
where IMPIANTI repeat n times and in turn, SEZIONI repeats itself n times. So for each IMPIANTI we can have n SEZIONI.
I then created a form that has two nested subforms, to which both have set the "repeat subform for each data item" property.
The problem is as follows:
to test I have included as example xml the following:
<PROGR_SEZIONE> 1 </ PROGR_SEZIONE>
<PROGR_SEZIONE> 2 </ PROGR_SEZIONE>
in advance i get two subforms IMPIANTI where:
in the first I have all three SEZIONI;
in the second no SEZIONI.
I can not understand why, I was convinced that it followed the logic of the xsd and no.
Help me please....