I'm trying to set the value of a textfield to a instance of another textfield in a repeating subform

Avatar

Avatar

KBoulier74

Avatar

KBoulier74

KBoulier74

07-11-2012

Hello all,

I am trying set the value of a textfield in a repeating subform/table row to another textfield in a repeating subform with the corrosponding instance number.

The user enters a list of Key Activities in the first part: -- KeyActivityRow is the repeating subform --

xfa.resolveNode("form1.#subform.KeyActivities.Row1.Table2.KeyActivityRow.Cell2")

-- KeyActivityRow is the repeating subform --

Which then Populates the corresponding occurence of:  --

xfa.resolveNode("form1.#subform.ActivityTable.HeaderRow.Table1.HeaderRow.Cell1")

-- ActivityTable is the repeating subform --

Kevin

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

dcidev

Avatar

dcidev

dcidev

07-11-2012

In the calculate event of form1.#subform.ActivityTable.HeaderRow.Table1.HeaderR ow.Cell1 enter this script in Language:JavaScript :

this.rawValue=xfa.resolveNode("form1.#subform.KeyActivities.Row1.Table2.KeyActivityRow["+ActivityTable.index+"].Cell2").rawValue

Kyle

Answers (2)

Answers (2)

Avatar

Avatar

KBoulier74

Avatar

KBoulier74

KBoulier74

07-11-2012

Found an extra space in the code. It works great.

Thank you

Avatar

Avatar

KBoulier74

Avatar

KBoulier74

KBoulier74

07-11-2012

Getting this error in the Debugger:

TypeError: xfa.resolveNode("form1.#subform.KeyActivities.Row1.Table 2.KeyActivityRow[" + ActivityTable.index + "].Cell2") is null

1:XFA:form1[0]:#subform[0]:ActivityTable[0]:HeaderRow[0]:Table1[0]:HeaderRow[0]:Cell1[0]:calculate