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.

Aggregate functions with date ranges

Featured Replies

I need to create a summery which displays the total amount a particular office in my company has billed another company in a particular time frame. So far I've figured out how to sum the total amount based on company number and office through a relationship concatinating the two fields. My question is how do I limit the total by a time frame?

Create a text field called "marker". Enter the date ranges in global fields (gFirstDate, gLastDate). Create a script that includes:

Find All

Set Field (Marker="")This step clears the marker field.

Set the date search field to (gFirstDate&"..."&gLastDate)

Perform find.

Set Field (Marker="x"). This script marks all the records you want to include in the total with an x.

Now, append the marker field to the concatenated field you described, base the relationship on this new field, and you should get your total for the date range.

You can not use SetField as this will only effect the current record not the found set. You will need to use Replace or use a loop to set the field and move to the next record and set the field.

"You can not use SetField as this will only effect the current record not the found set. You will need to use Replace or use a loop to set the field and move to the next record and set the field."

Ah, yes, Replace is the correct command in this case.

Tom

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.