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.

How to perform date range find -script in FM7 ??

Featured Replies

Hi !

I have upgraded to FM7 and now I am in trouble... blush.gif

In older versions I made a date range find simply with

Enter find mode

Set field(date;Start_date...End_date)

Perform find

In this new version I just cannot figure out how to do it... blush.gif

What should I put to Find requests box. If I click "Symbol" and "..." FM only looks for "..." with no Start_date or end_date.

I am sorry for this stupid question... blush.gif

Arttu

Actually, in previous versions you would need to use Insert Calculated Result and enclose your global date fields within DateToText in order to get the correct result. So I'm assuming you're referring to manual finds and not scripted ones, even though you referenced Set Field.

In 7, it works like you posted for scripts.

Enter Find Mode [ ]

Set Field [datefield; gStartDate & "..." & gEndDate]

Perform Find [ ]

Manual finds should be the same as previous versions.

If you are referring to the stored requests for Enter Find Mode or Perform Find, however, they can only be static (where the request will always be the same). Dynamic requests, any involving script parameters or globals, must still be entered in the way described above.

  • Author

Hi !

And thanks ! Actually I must admit, that it was my stupid mistake... blush.gif The Start-Date and End-date were defined as date-format not as gDates. Now it works. laugh.gif

But I still don,t understand the script step "Enter find modes" specify parameters. If I click there "Nationality" and add in next field "English" or Swedish" or "Dutch" and then click "Add", nothing happens when I perform the script.

Do I understand correctly that in this function I can replace these script steps:

Enter Find Mode

Set field(Nationality;"English")

New request

Set field(Nationality;"Swedish")

New request

Set field(Nationality;"Dutch")

Perform find

?? Or how to use that function ??

Thanks again in advance ! laugh.gif

Arttu

You are correct. This can be done with a single Perform Find step. See the attachment for an example.

Arttu.zip

  • Author

Thanks Queue !

That cleared out some problems with find-issue. Still I don't get it how to insert field values into that Restore Find Requests blush.gif

For example: I make a script where there is a Dialogue message about find requests. The input fields are: gSearch1, gSearch2, gSearch3.

How can I do a search: Find(gSearch1 or gSearch2 or gSearch3) in that manner you showed in your example B) When I try to do that, FMP tries to search words "gSearch1, gSearch2, gSearch3"

I'm losing my nerves already... crazy.gif

Thanks in advance !

Arttu

Only static find criteria can be stored. Dynamic criteria must still be set using Set Field, etc.

Enter Find Mode [ ]

Set Field [searchfield; gSearch1]

New Record/Request

Set Field [searchfield; gSearch2]

New Record/Request

Set Field [searchfield; gSearch3]

Perform Find [ ]

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.