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.

Finding Most Recent Date

Featured Replies

Hello,

I have searched for an answer to my problem in the archives, but haven't quite found a solution, or else I just can't see it.

I need to find the most recent contact date for a given Client and generate a warning if they haven't been contacted in more than 30 days.

For example, ClientA was contacted 9/1/2004, 10/1/2004, and 11/1/2004, but not since. I need to grab the 11/1/2004 to use for the warning calculation and have a "Client hasn't been contacted in 30 or more days" warning show up on the client's record. Each contact is a separate record and I need to do this across all of the clients. Am I posting in the wrong place and this is really a scripting question? Should I be using a relationship? I tried using a self join, but couldn't make that work either. Any help would be greatly appreciated as I'm feeling thick-headed.

Elizabeth

If the records are in order, you can use the Last function. Last ( relatedTable::field )

  • Author

Thanks so much, Transpower. I knew there had to be a way using a function. I tried using Max(Contact_Date), but didn't know about Last(). Now I just have to figure out a way to make sure those records stay sorted. I guess I could add a sort to the opening script. Again, thanks very much!

You don't need a script.

In the Clients table, create a calculation field (result Text) =

Case (

Get ( CurrentDate ) > Contacts::Date + 30 ;

"Client hasn't been contacted in 30 or more days."

)

Make sure the relationship to Contacts is defined as sorted by Date, descending.

(If you prefer to see the contacts in ascending order, define that in the portal setup.)

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.