Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Copy data value to new instance in 1 case, but not in another

Avatar

Former Community Member

I have a table setup to add new instances in different ways.  One adds a single row, one adds the whole table again (with the button for the row added as well).  When I add a new instance of the row I want any data entered in the first cell, to copy to the second row's first cell.  I can achieve this with global data.  I thought this was good.  However when I add the whole table, its copying this data as well (didn't think this through...), and I need my users to be able to enter new data in the second table, and have that 1st cell to copy down in any subsequent rows for the second table.  Correct example below:

TestNotes
April
April                                      Data copies from 1st cell as entered by user
AprilData copies from 1st cell as entered by user
Test (2nd Table Instance)Notes
MarchNew data entered by user
MarchCopied down from 1st cell in 2nd table

Is there a way to do this?  I imagine it will involve scripting - I am still learning how this works, but am willing to try!

1 Reply