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

Get the total count of current master page

Avatar

Avatar
Validate 1
Level 1
Ashok1
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Ashok1
Level 1

Likes

0 likes

Total Posts

12 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
Ashok1
Level 1

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
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

149 likes

Total Posts

340 posts

Correct Reply

96 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

149 likes

Total Posts

340 posts

Correct Reply

96 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
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
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

395 likes

Total Posts

2,686 posts

Correct Reply

491 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
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;