[FX.php List] Constrain Script Behavior CWP
Carmen Mercer
CarmenM at SpokaneSchools.org
Wed Mar 21 08:30:10 MDT 2007
I have a constrain script that I am using to help perform an and/or query. The solution I have is working great, except for one very particular instance.
$this->db->AddDBParam( '-script', 'constrain' );
$this->db->AddDBParam( 'School Name', $href['view'] );
My constrain script contains a find element, and an omit element.
This works great when there are some records that match all requirements. This also works great when there are zero records that match any of the requirements. However, if a record matches School Name but not one of the constrain requirements the result will spit out a single record that matches the School Name even though it does not match the constrain requirements.
If I use the same script inside FileMaker client, and click Continue when the script finds no records, then it appropriately finds nothing. However, if I click cancel when the script finds no records, it spits out records that match the School Name and as much of the Constrain as possible. It appears that this is similar to what the script step is doing in FX (though FX only returns one of these "best I can do" records instead of all of them).
It doesn't seem to matter what order I put the DBParams in, nor what order I put the constrain elements in the script.
Any way to change this behavior? I know, I should perform the constrain functions through PHP instead, but I'm not the one doing the majority of the PHP development. I get unfriendly looks whenever I want to add something!
Thanks,
Carmen
More information about the FX.php_List
mailing list