Expand my Community achievements bar.

Get all Table children

Avatar

Level 4

Hi folks,

Does anyone know if it's possible to get all child objects(like cells) of a Table object? I want to set each one of them's mandatory property to 'error'.

Thank you,

Yair

1 Reply

Avatar

Level 10

Hi Yair,

Yes, if the user can add rows to the table, then you would need to loop through all instances and change the objects one by one.

Something like this in Javascript:

var nRows = Table1._Row1.count;

for (var i=0; i<nRows; i++)

{

     xfa.resolveNode("Table1.Row1[" + i + "]").textfield1.mandatory = "error";

     xfa.resolveNode("Table1.Row1[" + i + "]").textfield2.mandatory = "error";

     xfa.resolveNode("Table1.Row1[" + i + "]").textfield3.mandatory = "error";

}

This would be in what ever object you want to control the mandatory property, eg like the click event of a button.

Hope that helps,

Niall

Assure Dynamics