Jump to content
Sign in to follow this  
Yorch

Need help on how to perform multiple AND search !!!

Recommended Posts

Hi !!

I just can't figure out how to make a boolean "AND" search upon the same field.

Lets have a text-field called HOBBIES, now... how can I define the

search condition in order to search for "reading" anywhere in the field and "windsurfing" anywhere in the field and "chess" anywhere in the field, all this at the same time, on this field??

Is this possible in FMP 5.5 ??

Thanks for any help on this

Share this post


Link to post
Share on other sites

Hello:

Manually, enter Find Mode, type reading in the field, go to Requests/Add New Request, type windsurfing, Requests/Add New Request, type chess. Click Find or hit Enter.

Semi-automatically, you can make a script like this:

Enter Find Mode [ ]

Set Field[HOBBIES, "reading"]

New Record/Request

Set Field[HOBBIES, "windsurfing"]

New Record/Request

Set Field[HOBBIES, "chess"]

Perform Find [ ]

...amongst other things

Ken

Share this post


Link to post
Share on other sites

No, you should use this form:

Set error capture [on]

Enter Find Mode

Set Field [hobbies,"=chess =windsurfing =reading"]

//I've put = for exact match, you can also mix exact with contains for ex =chess surf =reading

Perform find

Dj tongue.gif

Share this post


Link to post
Share on other sites

Thanks Dj for your hint, it is as simple as that!!!!

I guess what Ken is proposing is an OR search!

cool.gif Gracias

Yorch

Share this post


Link to post
Share on other sites

dj, is the code you posted new to 5.5?

When I tried your suggestion in my sample database in FMPro 5.0.v3, the script entered all three terms, along with the equal signs (=chess =windsurfing =reading) into the field and no records were found. I had three records, each containing one of those words.

Ken's example, on the otherhand, worked fine in FMPro 5.0.

Share this post


Link to post
Share on other sites

Well than you got the right result since the goal was to find those items all togheter in the same field of the same record and not in the same field of different records in which case you should simply use as many Find Request as you need.

Dj laugh.gif

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.

Guest
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.