Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Can I use a Sum Calculation accross dynamically added rows?

Avatar

Level 2

Well I have a working script that can add/delete extra rows to a table.

And I have a working script that can calculate the sum of the columns.

But when I put them together, the add row function stops working.

Is there a way to reconcile the two?

See attached example. It's actually not a real table, but subforms mimicking one.

2 Replies

Avatar

Former Community Member

You keep making the same mistake. You cannot just copy the code from one form to another. Each form has a different structure and the code is showing the path to the object. Have a look at the HIerarchy view and see how to get to the object that you want from the root node. I have updated your sample to show this.

Paul

Avatar

Level 2

I feel dumb now, I must have changed the name and forgot to change the script somewhere in between the row working and the calculation working. I kept going back to either/or and seeing them work separately... I promise I know better, I just forgot a step. Thanks for the correction.