Avatar

Correct answer by
Level 10

Well, xfa.context points to an object, so you can also use scripting methods you would use for fields or subforms.

Given you have a repeatable table row with a button and want to show a message onle when the button in a specific instance of the row is clicked, the script would look like:

form1.#subform[0].Table1.Row.Button::click - (JavaScript, client)

// xfa-context = form1.#subform[0].Table1[0].Row[n].Button

// xfa-context.parent = form1.#subform[0].Table1[0].Row[n]

if (xfa.context.parent.index === 2) {

xfa.host.messageBox("The third button was clicked!");

}

View solution in original post