Jump to content
Sign in to follow this  

If statements in Find mode

Recommended Posts


I just discovered something cool... this is version 5.0v3 but it may also work in v4 too (I expect it will but not tried it yet).

I have a scripted search -- users clicks "search" button, script changes to search layout and into find mode then pauses to allow entry of criteria, when script resumes it performs find and changes to browse layout. I've just discovered that while in Find mode I can use IF statements to look at field entries in the find request, and perform text manuiplations them on-the-fly using SET FIELD statements.

Heh Heh. This is way cool.

I was having trouble with a find in a portal to a related field, specifically trying to find an *empty* field. The script uses an IF to see whether in the find request the user is searching for an empty field, and if so it prepends "==" and adds quotes around the string, inserts the search string into a calculation field, deletes the user-entered text from the original fields, then performs the find.

And it works! Seems pretty robust too.

God I love FMP.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

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