Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adding a row error

Not applicable
I have built a table to calculate expenses in a seperate subform I have an associated add item button. The button adds the required extra line but does not add the exsense item to the total - in addition if gives the following error:



script failed (language is formcalc; context is

xfa[0].form[1].form1[0].#subform[0].#subform[3].Button1[0])

script = Table1._Row1.addInstance(1)



The calculation I included in the table is as follows

if (exists(Row1[0].expense) ==1) then

Sum(Row1[*].expense)

endif



I would be really grateful if someone could help me solve this error and ensure my expenses calculate correctly. The rest of the form functions well.



Thanks
2 Replies
pguerett
Level 10
Level 10
There is an example that does this already .....have a look at the Purchase Order in this location:



EN\Samples\Forms\Purchase Order\Dynamic Interactive\Forms



It does exactly what you want.
Not applicable
Thank you for the help - it is now working.