Hi,
I have created a flowed form with a subform (sf). I have automatic numbering in a numeric field in sf that is based on the instanceManager count. Hence, if i create a new subform the subform's numeric field increments based on the count.
The problem i have is is quite logical but i cant solve it:
If I add 3 subforms (they will be numbered 1, 2 & 3 in the numeric field) and then remove the subform with number 2, the number of instances will be 2. If i add a new subform, the numeric field will get the number 3 which already exists. I had 3 subforms, removed one and then added one...still 3 subforms.
Reordering the numbers is a bit beyond me at the moment, but what I would like to do is "fake" the count so that the instance number effectively wont change so if I remove number 2, the count will still be 3 and the new subform will be number 4.
I have tried this code on my remove button and nothing works:
sf.instanceManager.count + 1;
sf.parent.index + 1;
sf.setInstance(sf.instanceManager.count + 1);
Any ideas? I am using ES2