Jump to content
Sign in to follow this  
AJK

Constrain find possible?

Recommended Posts

I've created a compound found which works. I know need to constrain that foundset by omitting records which I would do with another find in FileMaker and the constrain with omit criteria.

Is it possible with the api to do this? I need to omit after I have found the records.

Share this post


Link to post
Share on other sites

Yes, with the setOmit(TRUE) statement:

$theFind =$fm->newCompoundFindCommand('YourLayout');
$request1=$fm->addFindCriterion('yourField', $value1);
$request2=$fm->addFindCriterion('yourOtherField', $value2);
$request3=$fm->addFindCriterion('yourOmitField', $valueOmitted);
$request3=$fm->setOmit(TRUE);
$theFind->add(1,$request1);
$theFind->add(2,$request2);
$theFind->add(3,$request3);
// you could sort here with $theFind->addSortRule() statements
$foundSet = $theFind->execute();

 

Edited by doughemi
Consistency in variable names

Share this post


Link to post
Share on other sites

My other method is to do the original find, and then drop the ones I don't want during the foreach loop used to display the records.

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  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Terrible Toll 
×
×
  • Create New...

Important Information

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