Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

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

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

View solution in original post

3 Replies

Avatar

Correct answer by
Level 8

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

Avatar

Level 2

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

Avatar

Level 2

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

Thank you