Copy data from one table cell to another table cell problem

aka44356106

19-01-2019

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

Accepted Solutions (1)

Accepted Solutions (1)

_Bruce_Robertson

MVP

20-01-2019

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

Answers (2)

Answers (2)

aka44356106

20-01-2019

thanks for quick support

correct script as per your suggestion is

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

it is working fine.