Get the total count of current master page

Avatar

Avatar

Ashok1

Avatar

Ashok1

Ashok1

22-06-2020

I have two master pages in my form,i have to get total count of current master page.

$layout.pageCount()--> total page count(including all master pages)

But  i have to get the  total count of current master page.

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

Kosta_Prokopiu1

Employee

Avatar

Kosta_Prokopiu1

Employee

Kosta_Prokopiu1
Employee

14-07-2020

If I understand you correctly then you can try the library object Master page n of m which I think does want you want:

kprokopi_0-1594735161670.png

When you place it on your Master page you get the page x of y, y=number of sheets on this masterpage.

kprokopi_1-1594735248636.png

Current page is  this.rawValue = this.parent.index + 1;
Number of pages on Masterpage:  this.rawValue = this.parent.all.length;

Avatar

Avatar

radzmar

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

385

Correct Answer

485

Avatar

radzmar

MVP

Total Posts

(val/1000)?string[".0"]}K

Likes

385

Correct Answer

485
radzmar
MVP

04-07-2020

One way to count specific master pages is to use the resolveNodes menthod-

 

// Count all instances of master page "MP2"
xfa.form.resolveNodes("#subform.#pageSet.MP2[*]").length;