Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Repeat data when adding row to two tables

Avatar

Level 1

Please help! Due date today!

Table 1 has add Row button which adds a new row to Table 1 and Table 2.  When Table 1 is filled out, it copies all data to Table 2.

When the new row in Table 1 is filled out, I cannot get the data to copy to the new row in Table2.

Any assistance would be most appreciated.

3 Replies

Avatar

Level 10

Hi,

I would have a some code in the calculate event of the row in Table2 that copies the data across, something like this for a cell called TextField1 in both tables, this.index will be the row occurrence in Table2

var source = xfa.resolveNode("Table1.Row1["+this.index+"].TextField1");

var target = TextField1;

target.rawValue = source.rawValue;

Regards

Bruce

Avatar

Level 1

Hi Bruce,

Thank you for responding.  I do not know how to attach the form to show you. (is this possible?)

I tried your script above but nothing happened.

I gave an example in my initial question above however the real table numbers are below.

When filling out Table5, it copies the data to Table21.

When clicking on the add row button in Table5, a new row is added to Table5, and a new row added to Table21.

When filling out the new row in Table5, the data is not copied to the new row in Table21.  It changes the last row in Table21.

Avatar

Level 10

Hi,

You can upload your form to whatever file sharing system you like, Google Docs, DropBox, etc.  Then you can add a link to the form in this thread.

Regards

Bruce