Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to check number of rows in my table on First page?

dhruvinm
Level 2
Level 2

Dear Adobe Experts,

As you can see below i am showing header row in both intial page and subsequent pages. But sometimes the area is not sufficient to show the item on first page

1762044_pastedImage_0.png

Like this

1762045_pastedImage_1.png

How can I achieve this!

BR

Dhruvin

1 Accepted Solution
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi Dhruvin,

Try this code in the docReady event of the form root (the top most) object

if (xfa.layout.page(xfa.form.form1.Table1.resolveNode("Row1[0]")) != xfa.layout.page(xfa.form.form1.Table1.resolveNode("HeaderRow[0]"))) {

xfa.form.form1.Table1.resolveNode("HeaderRow[0]").presence = "hidden";

}

This will test if the first header is on a different page than the first row then make the first header hidden.

Regards

Bruce

View solution in original post

4 Replies
_Bruce_Robertson
Correct answer by
Level 10
Level 10

Hi Dhruvin,

Try this code in the docReady event of the form root (the top most) object

if (xfa.layout.page(xfa.form.form1.Table1.resolveNode("Row1[0]")) != xfa.layout.page(xfa.form.form1.Table1.resolveNode("HeaderRow[0]"))) {

xfa.form.form1.Table1.resolveNode("HeaderRow[0]").presence = "hidden";

}

This will test if the first header is on a different page than the first row then make the first header hidden.

Regards

Bruce

View solution in original post

dhruvinm
Level 2
Level 2

Hi Bruce,

It worked like a charm! Thanks a lot for your inputs!

Below piece of Code with Hierarchy!

if (xfa.layout.page(xfa.form.FormQuoteNotification.bdyMain.frmTableBlock.tblTable.resolveNode("rowTableItem[0]")) != xfa.layout.page(xfa.form.FormQuoteNotification.bdyMain.frmTableBlock.tblTable.resolveNode("hdrTableHeader[0]")))

{

xfa.form.FormQuoteNotification.bdyMain.frmTableBlock.tblTable.resolveNode("hdrTableHeader[0]").presence = "hidden";

}

1764543_pastedImage_0.png

How can i access on page 1 , rowTableItem0 is on page 1 or not?

_Bruce_Robertson
Level 10
Level 10

Hi Dhruvinm,

The xfa.layout.page() will give you the page an object is on, the only trick is that you have to wait for the page to be laid out, so events like the initialize are too early. docReady seems ok otherwise try layout:ready but that get called a lot of times, so you may need other code to allow for that if it starts to have some impact.

Bruce