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.

Featured Replies

I have 2 fields:

Revision Date

Revision Number

I want to display the last record of Revision Date and Revision Number as part of a header for a report. I'm tried to create a calculation field, but I am not good with scripting in FMP. Also, I have tried to sort the data, but this doesn't seem to work at all in a header.

Any help would be greatly appreciated. Thank you very much in advance!

Normally, a field placed in the header displays data from the first record on the page. To display data from the last record in the found set, define an unstored calculation field =

GetNthRecord ( YourField ; Get (FoundCount) )

and place in the header.

Alternatively, use a global field and set it by script (after finding and sorting the reported records):

Go to Record [Last]

Set Field [ GlobalField ; YourField ]

  • Author

Thank you so very very much. Your awesome and have helped me several times now. I owe you one or two or ten...

  • Author

I also found alternatively, you can place a portal in the header to show only one row and make the background and border invisible, then sort it in descending order.

Not really - because a relationship ignores both the found set and local sorting.

So, if for example you do not want to include the last record in the report, this will bomb (unless your relationship is based on a recursive custom function that reproduces the found set in a portal - but let's not go there...).

  • Author

Well... I didn't understand most of what you just said, but I tried it and it worked. Don't know why. :

Well, I don't know what your relationship is, and what your found set is. Still, I believe that if you go to the last record and omit it, you will see the difference.

  • Author

Ahh, yes. I data is stored in a seperate table referenced via a relationship and placed into a portal. That data is never part of a find, but is sorted via the portal.

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.