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.

Getting most recent non-blank value from a portal field??

Featured Replies

  • Newbies

I'm new to FM, just got version 10 a few weeks ago. I'm proficient in an old legacy database program (filePro), but it's time to move on.

I have a database of equipment. A portal relationship (to "servicehistory" table) holds the service history for an item. When available (i.e. the info gets written on the work order), there is a field for the hour meter reading, "hourmeter". I want a field in the main (equipment) table set to the most recent, non-blank, hour meter reading entered into the portal records.

I spent several hours on it today. Everything else about FM has come easily, except this.

Portal records are sorted by date, with the most recent appearing at the top of the listing. But...the first five or more records in the portal may have nothing entered in the "hourmeter" field.

Max(servicehistory:hourmeter) will not work, as the hour meter on the equipment is occasionally reset when certain maintenance is performed, or it rolls over at 999.9 hours. So, for example, a service report from a year ago might show 750 hours, one last month might show 50, and last weeks service report might not have an entry. I want to set a field in the main table to, in this example, "50".

How???

Thanks!!!

The Last() function was designed specifically for this purpose - but you must make sure your relationship is not sorted (you may still sort your portal however you wish).

BTW, you want to use an unstored calculation field for this, not to set a field.

  • Author
  • Newbies

BEAUTIFUL!!!!

Worked on the first try!!!!:( :

Thank you for the help...the more I learn, the more I find that there is yet more to learn about FM!

Thank you!!

Edited by Guest

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.