[FX.php List] Constrain Script Behavior CWP

DC dan.cynosure at dbmscan.com
Wed Mar 21 10:07:20 MDT 2007


you probably need to handle errors inside your constrain script. that 
is, don't let your script spit out "best i can do" records - trap for 
that state in the script and force FMP to output no records.

dan

Carmen Mercer had written:
> 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
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 


More information about the FX.php_List mailing list