Highlighted

Adding a row error

Avatar

Guest

15-01-2009

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

Replies

Highlighted

pguerett

15-01-2009

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.