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.

Determining FIND criteria

Featured Replies

I am VERY new to FM Pro, and I've recently been handed a sophistocated set of FM databases to provide maintenance for. After searching the help file, and this site, my question is this:

Is it possible to determine the criteria that is being used in a FIND step within a script?

I have a script that performs a SetField[] on a particular field prior to executing a search, but I don't see a way to immediately find if it's looking for <, >, or = (or combination thereof). Example: if the IDnum for a table is set to 1000, how do I know if the find is searching for all records with IDnum <1000, >1000, or equal to 1000?

I know, I could execute the script, however, I don't wish to wait the 20 minutes it takes to compile the results. AND there are numerous scripts that I'd like to determine this criteria on.

Thanks in advance,

-KJ

You can print the script. The Print dialog has an option to print the "Script definition for" your script. Find requests are listed under the Perform Find step in the print out. I use a generic/text printer driver and specify "Print to file", so I don't have to kill trees, if I just want to look at the script or copy and paste it into a message.

It is possible to store find criteria in a script. These criteria do not appear as lines of code in the script; the stored criteria are simply the last find completed before the action was stored. To find out what these criteria are, insert a pause script step in your script immediately after the find. Then, after the script is paused, cancel the script and use the re-find function (ctrl-R on Windows or Apple-R on a Mac). This will take you to find mode and bring up the last find criteria used in that particular file.

Hope that helps,

Tom Parker

[email protected]

http://www.tgparker.com/filemaker

  • Author

Yes. Mr Parker has provided a means to answer my question. I did try to print out the scripts, as Thom suggested, and while it's nice to get a printed copy of the script, it just didn't provide the means of determining the exact criteria.

Thank you to everyone who responded.

-KJ

If you're in Find mode and a number field contains only a value (such as the IDnum field containing "1,000"), then the search is for those records where the value equals whatever was entered in Find mode. For unequal values, you need to add a symbol (such as "<").

If the search is scripted, you can add a pause to the script. If the only relevant script step is "Perform Find [Restore]", you can add a step before this step: "Enter Find Mode [Restore, Pause]". That'll show you what the find criteria are.

HTH,

Dan

Hello:

Actually, in my limited experience, I think it is a good idea to print out all of your scripts and keep them stored in a folder or something. This way you have documentation of all the scripts. This may have helped you if the person who designed the solution you're working on now had done this.

If you have:

Perform Find [Restore]

it will perform the last find that was done for this script. By printing them, you can see what these find requests were.

If you have:

Enter Find Mode

*then something like this*

Set Field [some entry]

*or*

Insert Calculated Result [some entry]

Perform Find []

it will perform find those values that you have set.

I'm sure you probably already knew this. Good luck

Ken

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.