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.

Saving symbolic search criteria

Featured Replies

I'm looking for a method for putting up a search layout, allowing the user to enter the search criteria, hit <return> to run the search, and then be able to re-display the search layout with the most recent search criteria, if the search needs to be refined.

I can do this by using Browse Mode and using Globals on the search layout, but I don't like the fact that, in Browse Mode, the user can't hit <return> to make the script resume.

I'd rather use Find Mode, for that reason alone. This eliminates the possibility of using Globals on the search layout.

Here's what I'm doing currently:

Set global fields to initial (null) values

Loop

-- Go to layout (search form)

-- Enter Find Mode (NO pause)

-- Set fields in search form from the global fields

-- Pause Script /* allow user input */

-- Set global fields from data in search form /* save criteria */

-- Perform Find

-- (Display results of find)

-- Exit loop if user is finished

End loop /* Iterate to redisplay search criteria and allow refinement */

The problem I'm having is that criteria such as "3/1/2005..3/15/2005" for a Date field, or "> 0" for a Number field, can't be retrieved, saved, and restored correctly this way. (These text strings have undergone conversion to Date or Number by the time I can get my hands on them.)

Is there a way to save search criteria for re-use AND retain the functionality of having the <return> key cause the script to proceed?

Gratefully,

Chap

"the user can't hit <return> to make the script resume"

That's because <enter> makes scripts resume.

Set Field can only enter data of the correct type into fields... a date range is not a valid date so it won't work. Instead use Insert Calculated Result, but be aware that this script is layout dependent.

IIRC, some time ago Bob Weaver posted a demo file with an impressive find recall system.

  • Author

Thank you for pointing me to Bob Weaver's post.

Lots of good stuff there to puzzle through. What I finally realized, though, is that what I needed was nothing but Modify Last Find! (If I'm not mistaken, Bob Weaver's script is mainly about displaying a Find request textually.)

Chap

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.