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.

Find records within date range

Featured Replies

Can someone let me know how you can instruct a Script to set the field value for a Perform Find within two global dates? In the SetField script step I can't seem to enter for instance

g_last_date...g_first_date

Thanks in advance.

You can't use Set Field to enter the result you need for this. Set Field requires the output to be in the format of the destination field. Use Insert Calculated Result instead. Your script would be:

Enter Find Mode []

Insert Calculated result[DateField,DateToText(g_First_Date) & "..." & DateToText(g_Last_Date)]

Perform Find []

  • Author

Thanks, Russ! Just before checking back on the forum to see your post I had consulted a reference book on FMP and come across the Insert Calculated Result script step, but hadn't understood the point about converting Dates to Text within the calculation. Everything works just fine now! Thanks again!

But Insert calculated result does have the limitation that you need to be on the layout with the fileds in quesiton otherwise when you run the script nothing is entered into this field. When dealing with any ranges I strongly recommend use of a plug in or the take the time and add this into your solution, it is worth the effort. http://www.onegasoft.com/tools/smartranges/index.shtml

  • Author

Thanks, Ocean. The article you recommend looks like interesting reading. Will definitely consider it.

Respectfully,

Alex.

Your original script may be faulty. It should read:

SetField(SearchField, g_first_date & "..." & g_last_date

There are two possible problems -- one is not putting the ellipsis (those three dots) in parentheses, and the other is putting the last date before the first (unless that's a typo).

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.