Avatar

Level 10

I see two issues.

1. On your calculations you are using the [*] notation to get all occurances of the field. The subform or RowName is what has the occurance on it not the individual fields....so remove the [*] from the C1, P1 etc... fields.

2. When you add a dynamic subform you have to get the fields that were created registered so that when the calcualtion fires it knows that those new fields are there. So on each addrow or remove button add this line of code to the end of your script:

xfa.form.recalculate(1)

Hope that helps

Paul