Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Page 1 of 6

Featured Replies

Hi,

I'm trying to create a count of pages in a footer that displays as "Page x of y" so that if there are 10 pages and page 2 is being previewed, it displays "Page 2 of 10." I've set up a calculation field called "PageNum" to Get(PageNumber) and another calculation field to Count(PageNum) but when I enter preview mode, all the pages display "Page 0 of 1." Any idea how this can be implemented correctlly?

Thanks!

You are making this way too difficult. You need a global number field LastPageNumber, a script that takes you to the preview mode and then goes to the last page and use the Get (Page Number) function to set the value of LastPageNumber.

On the layout use Insert - Page Number Symbol (##) and add text to look like this ## of LastPageNumber.

  • Author

So I would assemble this by creating a script that goes to the preview mode and to the last page, then the LastPageNumber will get the page number... But how can I do this without having to run the script every time I want to print?

Thanks

I would make it part of a Print script and use a button to run this script. I expect that you have to do a number of things prior to printing which could also be included in the script.

  • Author

Hi RalphL - I like the script suggestion. I'm just not sure how to incorporate the Get (Last Page Number) in the script. Also, am I correct that the script should be able to run from a button that only appears on a single layout?

rsglewin,

Basically as Ralph was suggesting, in your script to go to preview mode or print etc, just sets these steps.

Enter Preview Mode []

Go to Record/Request/Page [Last]

Set Field [gReportPgs; Get ( PageNumber )]

Go to Record/Request/Page [First]

If you want it to print, then you can have it pause in preview mode again and then run a print step.

Enter Preview Mode []

Go to Record/Request/Page [Last]

Set Field [gReportPgs; Get ( PageNumber )]

Go to Record/Request/Page [First]

Enter Preview Mode [Pause]

Print []

  • Author

I think I follow, but perhaps I'm more of a novice than I thought. =) In the Set Field step, what is the gReportPgs; Get (PageNumber) step is [Table::Field;Get (PageNumber), right? This seems to work. However, the script pauses before the print step but doesn't print... What am I missing?

Edited by Guest

gReportPgs is a global field that you have to create. This global field will be set to the last page number.

That is how you get page n of xxx

Furthermore, I added a pause step if you want to show a preview of what hte report will look like to the users. you do not have to have a pause step in here. Once paused, you can hit the continue button in the status area (left hand side) to continue the script and print.

  • 1 year later...

Happy New Year everyone!

Not to resurrect an old thread and all but something here wasn't quite answered.

How would I get the page x of y to restart page x at 1 for each record?

Right now I have it and when I do my find and say 10 records come up each with different number of pages being printed for each, the page x keeps counting up.

If record 1 had 3 pages and record 2 had 2 pages and record 3 had 4 pages by the time I hit page 1 on record 3 it reads

Page 6 of 4

How can you have a page 6 of 4?:D

I'm sure there's something easy to fix this I just haven't found it yet. Any help would be appreciated.

thanks in advance

acantho,

This thread is not the correct thread. I am assuming that you were referring to this thread.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.