[FX.php List] simple find in FM7 with Related fields

Jason H.Awbrey jason at stravin.com
Thu Apr 21 09:18:24 MDT 2005


Jane,

FileMaker tends to choke if there is a query against a layout where 
there are related fields and there are currently no related records. 
The WPE generates an XML parse error that hangs on the first related  
field where there is no related record. The workaround is to place any 
related fields in a portal instead of just placing the fields on the 
layout. You may have to alter your programming slightly when adding 
records through the portal but you shouldn't run into that problem any 
longer.

HTH,
Jason H. Awbrey

On Apr 20, 2005, at 5:45 PM, Jane Chinn wrote:

>
> Hi,
>
> When using FM Server 7 and a database with related fields contained in 
> another FM7 Db and a page that does a test search(see php page below):
> I get an error which is:
> Warning: Cannot use a scalar value as an array in 
> /Library/WebServer/Documents/forgetest/search_results.php on line 21
>
> Warning: Invalid argument supplied for foreach() in 
> /Library/WebServer/Documents/forgetest/search_results.php on line 21
>   LastName:
>
>
> <?php
> include_once('../FX/FX.php');
> include_once('../FX/FMErrors.php');
> include_once('../FX/server_data.php');
>
> $LastName=$_POST['LastName'];
>
> $groupSize='1';
>
> $search=new FX($serverIP,$portNumber,'FMPro7');
> $search->SetDBData('peer_roster.fp7','Layout1',$groupSize);
> $search->AddDBParam('LastName',$LastName);
>
> $searchResult=$search->FMFindall();
>
> echo $searchResult['errorCode'];
> foreach($searchResult['data'] as $key=>$searchData);
>
> ?>
> <html>
> <head>
> </head>
> <body>
>
> LastName: <? echo $searchData['LastName'][0]; ?>
> </body>
> </html>
>
> Does anyone know what causes this and how to fix it.  The relationship 
> (LastName) is is actually in another database not in the one being 
> searched.  This same simple search of another database with the same 
> field name is not a problem.
>
> Thanks,
> Jane _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2232 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20050421/3ebaff53/attachment.bin


More information about the FX.php_List mailing list