Jump to content

If statements in Find mode


Vaughan
 Share

This topic is 7384 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hey

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.

Link to comment
Share on other sites

This topic is 7384 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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