Skip 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.

Script to Perform Find Using Date Range

Featured Replies

  • Newbies

I am trying to write a script that will find records within a range. After reviewing other posts, I have tried several approaches, none of which work. At the moment, I am doing the following:

Records in my To Do database all have a Due Date.

I have created global storage date fields gStart and gEnd.

Unsuccessful scripts include:

Enter Find Mode[]

Set Field[To Do::Due Date = To Do::gStart & "..." & To Do::gEnd]

Perform Find[]

This script returns error message "No Records Satisfy Criteria" even though I know that many records fall within the specified range. I note that many posts on this subject use a ";" rather than an "=" in the Set

Field line above, but the Set Field "Specify" dialog box will not allow anything other than an "operator" between Due Date and gStart...gEnd.

I have also tried the Insert Calculated Result approach along the same lines:

Go to Layout [Due Date Report]

Enter Find Mode[]

Insert Calculated Result [select;To Do::Due Date=To Do::gStart & "..." & To Do::gEnd]

Perform Find []

Whenever I use the above approach, I receive an error message "The value in this field must be a valid date etc." But the Due Date field, as well as the gStart and gEnd fields are all date fields formatted to show dates as "12/23/2005"

This is my first foray into scripting, so be gentle . . .

Welcome to the forum.

I think that your first attempt is very close. The post you reference is probably written, and not a true representation of the script.

The obvious question...you've entered dates into gStart and gEnd, and they do have their storage options set to global. Many people think that starting the field name with a "g" is enough. Many people forget to click the global storage option.

That out of the way, Set Field is definitely the way to go. There is no "=" sign in the script step. Set Field asks for two things: the field to set (that is your Due Date) and the value to set it to (in your case the calculation which looks fine (To Do::gStart & ".." & To Do::gEnd).

  • Author
  • Newbies

Thanks! It worked! I was entering the entire calculation [Due Date = gStart ... gEnd} in "Specify" Calculated Result, rather than separately using "Specify Target Field" [Due Date] and Specify Calculated Result [gStart...gEnd].

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

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.