[FX.php List] edit related fields

Michael Layne fx at 9degrees.com
Tue Feb 22 03:26:37 MST 2005


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);

	$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



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
> 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
> 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  :   
-------------- 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-0001.bin

More information about the FX.php_List mailing list