cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding Header Row incase of no item row

Sumankalyan17
Participant
0 Kudos

Hi all,

As part of design , I am printing single header row per page followed by item rows.  I have some free text field as part of item row which might flow to many pages.

Now the requirement is if the page contains only the free text data and  no new item row, then do not print the header row.

I am trying the below java script in the header row sub form to hide the header row if no item are printed in the current page,but this hides header row in all pages.

Kindly advise.

Regards

Suman Kalyan

Code -

var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);

var flag = 0

for (var i=0; i <= fields.length-1; i++) {

if (fields.item(i).name == "IV_ItemNo") {

flag = 1;

}

}

if (flag ==0)

{

this.presence = "hidden";

}

Accepted Solutions (0)

Answers (1)

Answers (1)

prajeshdesai
Contributor
0 Kudos

Just uncheck Min Count = 0 and set Max Count = 1 in table control,

No scripting is required for this requirement.

Hope this helps.