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

Avatar

Avatar

dhruvinm

Avatar

dhruvinm

dhruvinm

29-05-2019

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372
_Bruce_Robertson
MVP

03-06-2019

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

Answers (3)

Answers (3)

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372
_Bruce_Robertson
MVP

03-06-2019

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

Avatar

Avatar

dhruvinm

Avatar

dhruvinm

dhruvinm

03-06-2019

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?

Avatar

Avatar

dhruvinm

Avatar

dhruvinm

dhruvinm

03-06-2019

looks promising let me try that