Expand my Community achievements bar.

Using addInstance in a IF calculation

Avatar

Level 2

Hi

i am trying to get a addInstance to work unpon a IF result

if

(test1.Headrow.TextField12 ==16)

then

_test1.addInstance(1)

;

endif

this works fine for the first time and a new subform is created, but unpon the second time its run in the new subform, it goes into a loop and i end up with 12+ subforms scrolling down the page.

the thing i have noticed is that if i allow the text field to display 16 and the new subform is added, then change the textfield result a lower figure then it runs ok.

the bug seems to be with the textfield being linked to the textfieldd in the new subform.

please fill free to try the form, select sky+ and then qty 8 and you will see what happens, i have been trying to solve this for a few weeks.

cheers

Rick

1 Reply