Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted
Total newbie questions about a simple PHP search using addFindCriterion to match checkbox value.
 
I have 3 checkboxes in a field called "myChoices_field" containing the following choices - where "airport" is selected.
 
[ ] air
[x] airport
[ ] air vent
 
So that means that "myChoices_fld" contains only the value "airport".
 
If I do a search via PHP looking for a record that matches only the choice "air" - this is what I would use:
 
$findCommand->addFindCriterion('myChoices_field', "air");
 
I should expect it NOT to match anything since "air" does not equal to "airport". However - I'm getting back the record that matches "airport". Clearly - it's just doing a substring match.
 
How can I search a checked value that actually just searches the whole checked value - not do a substring search? I'm I completely missing where to find this in the documentation?
 
Pointing me to the documentation would help greatly. Thanks!
Posted

All finds by default use the same search methodology as FileMaker does - a 'begins with' search... So from the above, Airport, Airplane, Airgel will all match...

 

If you use an exact match search ( ==Air ) then you will get no results.

 

However, you will also get no results for ==Airport *if* anything else is checked in the value list...

This topic is 3766 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
×
×
  • Create New...

Important Information

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