[FX.php List] Search a calculated field

Marisa Smith marisa at datasmithconsulting.net
Sun Mar 12 05:02:47 MST 2006


Rob -

I think you need to put your operator in quotes:

$findListe->AddDBParam('Activity','Active',eq);  should be $findListe- 
 >AddDBParam('Activity','Active','eq');

Also, I have had similar things happen when the result of the  
calculation is set to the wrong type.  Make sure the result is TEXT  
and not a number.

Let me know if either of those suggestions help.

Marisa


---------------------------------------------------------------------
Marisa Smith, President
DataSmith Consulting, LLC
9206 Huron River Drive
Dexter, MI 48130
Phone & Fax: (734) 426-8077
http://www.datasmithconsulting.net
Filemaker Solutions Alliance Associate Member

On Mar 12, 2006, at 6:51 AM, Rob H. Christensen wrote:

> Hi,
>
> I have a field in my database, which is set with a simple calculation:
>
> Case ((Status="Archived);"Passive"; 
> (Status="Canceled);"Passive";"Active").
>
> When I try to search the database to get a list of active records,  
> I either
> get nothing (Error 401) or I get a list of all files, whether the  
> field is
> set to "Active" or "Passive"
>
>  $findListe=new FX($serverIP,$webCompanionPort,'FMPro5/6');
> $findListe->SetDBData('Database.fp5','Layout',$groupSize);
> $findListe->SetDBPassword($PASWORD,'');
> $findListe->AddDBParam('Activity','Active',eq);
> $findListe->AddSortParam($Sorter,'descend');
> $findListe->FMSkipRecords($skipSize);
> $findListeResult=$findListe->FMFind();
>
> If I remove the "eq" I get 401 No record match...
> If I set it as
> $findListe->AddDBParam('Activity','Passive',eq);
> I get a list of all records.
> If I add the field in the list, it shows the proper data for each  
> record.
> Why can't I search and get a list of Active records only?
>
> Rob
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060312/ea003279/attachment.html


More information about the FX.php_List mailing list