Get current master page number in formcalc/Javascript
I have two master pages in my Adobeform and i need to get the current master page number to assign that value to the field in subform of bodypage.
i have tried below things to get current master page number and total count of current master page but it is giving page numbers including all the master pages.
$layout.page ( ref ( $ ) )--->giving current page number(including all master pages)
$layout.pageCount()--> total page count(including all master pages)
Kindly provide the logic to get the current master page number and count.