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 record count

Featured Replies

I am trying to found out the number of times a customer has signed in the last 30 days. I have a table named “sign_in” and each customer has an ID number. Any help to point in the right direction would be appreciated.

I did some testing and found this to work pretty well.

In your "sign_in" table create a number calculation field like this:

Name: [color:gray]LastThirty

Formula: [color:gray]If ( [date_field] ≥ (Get ( CurrentDate ) - 30); 1; "" )

(In the storage options check "Do not store calculation results)

Now, back in your "customers" table create a relationship to the "sign_in" table like this:

[color:gray]customers::customerID = sign_in::customerID

(you'll of course need to make sure that when records are created in the "sign_in" table that they have a customerID value that matches a record in your "customers" table)

Now to get your count. In the "customers" table create a calculation field like this:

Name: [color:gray]Count

Formula: [color:gray]Count ( sign_in::LastThirty )

The count function will return the number of related records that contain a valid value in the "LastThirty" field. So, only those that are within the last thirty days. The small test I put together seemed to work well. Even when I manually changed the date/time on my computer, the correct count would appear after any kind of screen refresh (layout change, record load, etc) Let me know if that helps.

Edited by Guest

  • Author

This works great, think you. I was trying to write some long script that was not working out.

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.