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

Help with creating a Find using logical or


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

Recommended Posts

Posted

Hey all,

 

I've got the following find command statement. I need it to search on 4 fields, the first 3 being standard items, but the 4th field containing a possible of 4 different options. Any ideas how can I achieve this? Many thanks as always

 

$request = $fm->newFindCommand('Cars');
$request->addFindCriterion('Color','=='.$_POST['Color']);
$request->addFindCriterion('Distance',$_POST['Distance']);
$frequest>addFindCriterion('Age',$_POST['Age']);


$request->setLogicalOperator(FILEMAKER_FIND_OR);

$request->addFindCriterion('Type', 'Coupe');
$request->addFindCriterion('Type', 'Estate');
$frequest>addFindCriterion(''Type, 'Hatchback');
$request->addFindCriterion('Type', 'Saloon');
$requestResult = $request->execute();

 

Posted

I think it's called CompoundFind.

 

I tend to sidestep that, and use a calc field that I then search on. Points for laziness, negative points for elegance...

This topic is 4293 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.