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.

Find if a record exists with two criteria and return a value

Featured Replies

I have two tables one called customers, one called contacts line items, related via the customer id field.

The contacts lines items table records all contacts that I have with the customers, and contains the fields: customer id, contact id (serial), date.

In the customers table I want to have a field called 'contacted this week', where if there is a record in the contacts line items table, that has the customer id & a contact within a specified range (within the past 7 days), it will return yes, and if there is no such record - ie, no contact has been added within the past 7 days, then it returns no.

What would be the most viable way of doing this?

A progression from this would be, '# of contacts this week', which would count the number of contacts to each associated customer within this week.

Any help would be greatly appreciated!

Try something like:

Max ( Contacts::Date ) ≥ Get ( CurrentDate ) - 7

If this is for display only, you could use conditional formatting instead of a field.

A progression from this would be, '# of contacts this week',

No. that would be something else. Again, if this for display, you could use a filtered one-row portal containing a summary field - Count of ContactID - from the Contacts table.

  • Author

Try something like:

Max ( Contacts::Date ) ≥ Get ( CurrentDate ) - 7

This works a treat!

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.