Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Repeat data when adding row to two tables

kerryc5820297
Level 1
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
_Bruce_Robertson
Level 10
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

kerryc5820297
Level 1
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.

_Bruce_Robertson
Level 10
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