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 x of y numbering

Featured Replies

I wish to put in the header of my form a "Page x of y Pages" counter. In FM5, I had to write a script to go to preview mode, count the pages and insert that number into the "y" page number. I thought I heard that this was simplified in FM7. Has it and how is it done?

You can do "Page 1 of 4" quite easily.

Step 1: Create a global number field (g_total_pages).

Step 2: Insert the following into your script before displaying the form

Freeze Window

Enter Preview Mode (NO Pause)

Go to Record/Request (last)

Set Field (g_total_pages, Get(PageNumber))

Go to Record/Request (first)

Enter Preview Mode (Pause)

Step 3: On your layout, enter the following:

Page ## of <<g_total_pages>>

  • Author

That is what I have been doing in FMP5. I was hoping that 7 had a non scripting way to do this...Oh well. Thanks for the reply.

  • 3 weeks later...

i have a way to do it with caculation fields

first you do an insert page numer in your header nad you get hte "#" symbol when you are in preiview mode it will show what page you are on that is your" Page ____ "

for the total number of pages the "of ___" part you have to create a feild that is a summary field, it hsould be called something like "total count" and set it to a summary field and select count, and then choose a field that has something in it on every record, then enter this calculation in to a new caculation field

=IN((sum(total count, total count)-1)/x)+1

x should be the number of records that fit on a page

and that should do it

if it doesn't make sense email me at [email protected]

Another way to do it is to define an unstored calculation field in each table with this calculation: Get ( RecordNumber ) & " of " & Get ( FoundCount)

Then just insert this field into your layout.

Both of these techiques assume that a constant and integral number of records filt on each page.

I my experience this is rarely so, and the only reliable method is to preview the pages, change to the last page and store the last page number into a global field.

Create an account or sign in to comment

Important Information

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

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.