[FX.php List] Re: FX.php_List Digest, Vol 7, Issue 5

Test test at mail.sesp.northwestern.edu
Tue Feb 22 13:37:18 MST 2005


Michael,

thanks for the pointer. that's a good idea to deal with this problem. I was about to set up multiple layouts based on each related tables & make multiple fx calls. This is def a cleaner solution. For long while I was confused by which internal record id I should be using for the related fields, and unfortunately the sample code in fxexamples.php does not help to clear things up.

I just started coding on FMP with web interaction 3 monthes ago in 7 only, so I don't know how it used to work, but I guess things changed quite a bit with 7 advanced. Actually FMP does provide record id of related fields if the call to FM web publishing engine is using fmresultset.xml instead of the FMPXMLRESULT.xml, unfortunately fx.php only uses FMPXMLRESULT.xml right now. Maybe fx.php v4 will have better integration with 7SA? Regardless, thanks for all the help, and I don't know where my project would be without fx.php

chuck

>From: Michael Layne <fx at 9degrees.com>
>Subject: Re: [FX.php List] edit related fields
>To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>Message-ID: <3B9478CE-84BC-11D9-A3E4-000D9335D5D0 at 9degrees.com>
>Content-Type: text/plain; charset="us-ascii"
>
>Chuck,
>
>Yes, you do need the actual internal record ID to edit or delete a 
>record, parent, child, or otherwise.
>
>I had this same problem, and I ended up creating a calc field called , 
>oddly enough, 'recID'.  The calculation is 'Get ( RecordID )'  in the 
>child table. I then placed it in the portal of the corresponding 
>layout, and then had my reference to the 'related' internal recID 
>required to edit the record.
>
>Never figured out how to generate the internal recID from related 
>values.  you know this, right? :
>
>	$query = new FX($ip, $port);
>	$query->SetDBData($db,$lay);
>
>	$query->AddDBParam('id',$_GET['id']);
>		
>	$result = $query->FMFind();
>	$data = current($result['data']);
>		$recid0 = explode ('.', key($result['data']));
>		$recid = $recid0[0];	
>
>The last line gives you the internal ID needed to edit/delete.  That 
>would be for the 'parent' record
>
>HTH,
>
>Michael
>
>On Feb 21, 2005, at 6:56 PM, Test wrote:
>
>> I'm working on a project using fx.php w/ Filemaker 7.02 server 
>> advanced on Xserve running 10.3.8. Everything works fine when all the 
>> fields on the layout are from the table the layout based on. I can 
>> also use fx.php to retrive value from the layout with related fields. 
>> However, when I tried to modify the value of any related field, I'll 
>> get error code 101, which according to FMP doc means record is 
> > missing, even though I can retrive the data for that record in fx.php 
>> (yes, all related fields are within a portal).
>>
>> I tried to send command like
>>
>> http://127.0.0.1/fmi/xml/FMPXMLRESULT.xml?-db=CTD&-
>> lay=step1&ID=101&table::field1.1=Dr&-edit
>>
>>  in the browser to FMP7 directly, but still getting the same error in 
>> xml result. So I thought maybe the problem is in Filemaker. However, I 
>> just found out if I send this command in browser to filemaker
>>
>> http://127.0.0.1/fmi/xml/FMPXMLRESULT.xml?-db=CTD&-
>> lay=step1&ID=101&table::field1.23=Dr&-edit
>>
>> the related record will be updated without any problem. It seems that 
>> I have to specify the filemaker interal RecordID for the related field 
>> in the related table in order to edit the field. However, because FX 
>> is using FMPXMLRESULT.xml instead of fmresultset.xml, there's no easy 
>> way for me to find out the internal RecordID for the related field by 
>> just making 1 FMFind() call on the parent record. Any suggestion on 
>> what I should do in order to edit the related fields w/ fx?
>>
>> chuck
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>
>Michael Layne  :  9 degrees development  :  www.9degrees.com  :  
>404.226.7835
>-------------- next part --------------
>A non-text attachment was scrubbed...
>Name: not available
>Type: text/enriched
>Size: 2788 bytes
>Desc: not available
>Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20050222/848bda7b/attachment.bin
>
>------------------------------
>
>_______________________________________________
>FX.php_List
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list
>
>End of FX.php_List Digest, Vol 7, Issue 5
>*****************************************



More information about the FX.php_List mailing list