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.

Perform Find with variable dates

Featured Replies

Instead of finding records within a fixed range

03/16/2011...03/30/2011

I want to find based on variable dates, so that I have a set that always shows me dates in the upcoming two weeks

//... //+14 doesn't work

>=// AND <= //+14 doesn't work

Thanks for the help

Try using the Get(CurrentDate) function. Note that this cannot go into a stored request - you must either use the

Enter Find Mode []

Set Field [ SearchField ; calculated criteria ]]

Perform Find []

structure, or pre-calculate the criteria into a script variable.

  • Author

Thanks. I'm getting closer.

My plan is to have a series of buttons, each set to

Perform Script ["FindCurrentStudents"; parameter "TermX"]

Where TermX is "Term1" or "Term2" or "Term3"

Script "FindCurrentStudents" is:

Enter Find Mode[]

If [ Get (ScriptParameter) = "Term1"]

Insert Calculated Result [select; Students::Start; Get (CurrentDate ) -28 & "..." & Get ( CurrentDate )]

Else If

[ Get (ScriptParameter) = "Term2"]

Insert Calculated Result [select; Students::Start; Get (CurrentDate ) -56 & "..." & Get ( CurrentDate ) - 28 ]

Else If

[ Get (ScriptParameter) = "Term3"]

Insert Calculated Result [select; Students::Start; Get (CurrentDate ) -84 & "..." & Get ( CurrentDate ) - 56 ]

Endif

Perform FInd []

The individual range statements work fine.

How do I pass this parameter properly in the Perform Script statement?

How about making the script parameter 1 or 2 or 3, then:

Enter Find Mode []

Set Field [ Students::Start ; Get (CurrentDate) - 28 * Get (ScriptParameter) & "…" & Get (CurrentDate) - 28 * ( Get (ScriptParameter) - 1 ) ]

Perform Find []

  • Author

Yes, that works great. Thanks for the insight :)

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.