[FX.php List] Create new records in related table

Jack Kelly jlk4p at virginia.edu
Tue Aug 22 06:42:04 MDT 2006


Gerry,

I was testing this last week with FM 5/6. I found the following to be  
important when trying to create a new record that included portal data:

1. May sure to use a layout that contains the portal reference, i.e.  
$create->SetDBData('file.fp5','Layout with Portal');

2. When creating a new portal record entry, use zero as the index  
reference. (Normally you use a number 1...n to reference an existing  
portal record.) So your key would look something like this,
$create->AddDBParam('DocMeta::xCaseID.0',$value);

Keep in mind that I was working with FM 5/6. The syntax might be  
slightly different with newer versions of FM.

Hope this helps,
Jack

On Aug 21, 2006, at 11:27 AM, gerry.charest at agfa.com wrote:

> Hi All,
>
> Has anyone had any luck posting a form that produces a parent  
> record and child records using a single form through a single FMNew 
> () posting?
>
> What I have is a form that is used to create a new record. This new  
> record consists of field values from several related records (four  
> really) accessed through portals. Each portal is constructed with  
> the "Allow creation of records in this table via this  
> relationship" . My thinking here is that I should be able to create  
> a form that has all the necessary fields from the parent record and  
> related records or children and as long as the parent record /field  
> is populated first then related records will be create as necessary  
> as those fields are entered. Somebody stop me if I'm out of my mind.
>
> Also is the proper from to enter data into a portal field,
> $create->AddDBParam($key,$value)
> where $key = "DocMeta::xCaseID"
>
> I have a feeling my post issue has something to do with knowing  
> what portal row to interact with but perhaps I'm all wet on this  
> one also.
>
> Best regards
> Gerry Charest
> Agfa Corporation
>
>
> _______________________________________________
> 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: smime.p7s
Type: application/pkcs7-signature
Size: 4206 bytes
Desc: not available
Url : http://www.iviking.org/pipermail/fx.php_list/attachments/20060822/6d4ee55b/smime.bin


More information about the FX.php_List mailing list