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.

Get filtered result from related table (portal)

Featured Replies

I'm building a maintenance scheduling & tracking solution and am trying to create a field, which will calculate the date from the most recent entry into a related, LINE ITEMS table.  If I sort the related table by date descending, the following calculation works, as I've used it in other solutions:

GetNthRecord ( LINE_ITEMS::date ; 1 )

In this case, I'd like to filter the results by another field in the related LINE_ITEMS table.  For example, I'm going to have a text field, which contains a value from a list - MONTHLY, QUARTERLY, ANNUAL.  In the parent table, I'd like to have three calculation fields (one for each value), and obtain the (separate) most recent entry for MONTHLY, QUARTERLY, ANNUAL.

Do I need to have three, separate related tables, or can this be done via calculation "filter"?

If this is for display only, you could use 3 one-row portals, each filtered to show a specific type. Otherwise it gets more complicated.

---
BTW, instead of sorting the relationship and getting the value from the 1st record, you could have used simply:

Max (  LINE_ITEMS::date )

or (assuming the records are entered in chronological order):

Last (  LINE_ITEMS::date )

Note also that:

GetNthRecord ( LINE_ITEMS::date ; 1 )

can be written simply as:

LINE_ITEMS::date

since a reference to a related field always gets data from the 1st related record.

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.