Avatar

Level 1

Hi Radsmar,

 

I am attaching you screenshot for better understanding:Code_snippet.JPG

Scenario is like this a column in table has multiple subforms, so for each record the particular subform should be visible if it has data.

otherwise it should be invisble.

Note: i have renamed subforms names and made necessary code changes as well for better understanding.

 

Revised Code:

 data.#subform[0].#subform[2].#subform[3].GT_TABLE.DATA[0].FamilySF.SpouseSF::initialize - (JavaScript, client)var len = xfa.resolveNodes("data.#subform[0].#subform[2].#subform[3].GT_TABLE.DATA").length;
//var fields = xfa.form.subform.table.row.all;xfa.host.messageBox("Hi");
for (var i=0; i<=len; i++ )
{xfa.host.messageBox("Hi");
if ( xfa.resolveNode("data.#subform[0].#subform[2].#subform[3].GT_TABLE.DATA["+ i +"].FamilySF.SpouseSF.TextField1").rawValue == "X"){this.presence = "hidden";
}else{this.presence = "visible";
}
}