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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Copy data from one table cell to another table cell problem

aka44356106
Level 4
Level 4

add  :

SF0.instanceManager.addInstance(0)

SF2.instanceManager.addInstance(0)

SF3.SF4.instanceManager.addInstance(0

i have a form in which 3 table present in three subform "SF0", "SF2" (SF2 Repeating Subform ) and "SF3.SF4"  (SF3 & SF4 Both Subform and SF4 Repeating Subform)

when i copy data from SF0.Table1.Row1.Cell1 to SF2.Table1.Row1.Cell1 by this.rawValue = SF0.Table1.Row1.Cell1.rawValue  work fine in all instance field

But when copy data from SF0.Table1.Row1.Cell1 to SF.SF4.Table1.Row1.Cell1 by   this.rawValue = SF0.Table1.Row1.Cell1.rawValue    only first value copy in all new add instance field.

plz helpUntitled.png

1 Accepted Solution
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

I'm note sure I understand the forms structure, usually it would be Row1 that would repeat, but you seem to be repeating a block containing a table of one row?

The approach would be the same, you need to find out which row of the second table you are in and reference the that row in the source table., so something;

this.rawValue = SFO.all.item(SF2.index).Table1.Row1.Cell1.rawValue

The index property will return the position in like named items so it we are in the second row of the SF2 table we reference the second row of SFO.

Regards

Bruce

View solution in original post

3 Replies
MinusZero
Level 7
Level 7

You will need to reference the row instance you want to copy to.

I wrote up some information here which will point you in the right direction.

_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi,

I'm note sure I understand the forms structure, usually it would be Row1 that would repeat, but you seem to be repeating a block containing a table of one row?

The approach would be the same, you need to find out which row of the second table you are in and reference the that row in the source table., so something;

this.rawValue = SFO.all.item(SF2.index).Table1.Row1.Cell1.rawValue

The index property will return the position in like named items so it we are in the second row of the SF2 table we reference the second row of SFO.

Regards

Bruce

View solution in original post

aka44356106
Level 4
Level 4

thanks for quick support

correct script as per your suggestion is

xfa.resolveNode("SF0["+SF4.index+"].Table1.Row1.Cell1").rawValue;

it is working fine.