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.

sorting in portals

Featured Replies

Hi, I'm writing a script to retrieve the record in a portal with the most recent date with it. I have sorted the portal in the layout with the correct order, but just don't know how to retrieve this related record..

I have a household table which relates to a comment table. So in the household layout, I have a portal to contain all the related comments, and they are sorted with most recent first. Now how can I retrieve the date of that most recent comment? Do I need to sort the records in the portal? If yes, how? Please advice. Thank you!

What exactly do you mean by "retrieve"?

  • Author

I mean getting the data of the field comment_date..

Getting it where? There is a difference between displaying a value, using it in a calculation, etc.

  • Author

ok i got it.. sorry for not being clear.

I'm defining a field "Days since last contact" to contain the date of the most recent contact which is the date of the most recent comment in the comments portal in the household layout.

I was thinking about having the "Days since last contact" as a calc field but didn't know how to do the calc.

Try =

Get (CurrentDate) - Max ( comments::comment_date )

Set the result type to Number and storage to "Do not store...".

  • Author

that works! thank you!!

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.