[FX.php List] carry data over

Jonathan Schwartz jonathan at eschwartz.com
Wed Sep 6 09:24:15 MDT 2006


Chiming in...

That is the case when the second page containing the FMNew response 
also contained the second form...or at least performed an include for 
the second form.  Otherwise, we'd be looking into setting variables 
in sessions to track the recid. Correct?

I'm making this distinction because many of the examples and 
tutorials out there offer a simple form->form response scenario, and 
don't address the reality of a continuous process which can involve 
multiple forms in the process as well as multiple functions on the 
same page.

Gary...this was a major stumbling block in my own learning curve of 
how to track the same record throughout a series of pages.  Once I 
learned how to use "sessions", it was smooth sailing.  I encourage 
you to get this under your belt as soon as you can.

Jonathan

>Actually, you don't need to re-find the record you just created. The 
>variable you set to be the result of FMNEW() contains the typical FX 
>data array for a single FMP record, including the record ID. You can 
>reference this in the second form.
>
>Dale
>
>On Sep 6, 2006, at 7:13 AM, Alex Gates wrote:
>
>>Gary,
>>
>>You'll need the recid of the page you want to edit -
>>On your FileMaker layout, create a calculation field that is
>>Get(RecordID) http://www.filemaker.com/help/FunctionsRef-251.html
>>
>>Before you move to the second page, you'll first need to find the record
>>you just created.  Bring back the record ID, make it a session variable,
>>and use it on the following pages as the parameter in your edit.
>>
>>Your edit will look something like this:
>>
>>$edit=new FX($serverIP,$webCompanionPort,'FMPro7');
>>	$edit->SetDBData('FileName.fp7','LayoutName');
>>	$edit->SetDBPassword('password','username');
>>	$edit->AddDBParam('-recid', $recid);
>>	$edit->AddDBParam('AdditionalField1', $additionalfield1);
>>	$edit->AddDBParam('AdditionalField2', $additionalfield2);
>>//(and so on)
>>	$editResult=$edit->FMEdit();
>>
>>
>>The Ultimate Guide to FileMaker and PHP is a really great resource -
>>page 152 walks you through a wonderful example.
>>
>>http://www.fmwebschool.com/filemaker_php.php
>>
>>I hope this helps - - I didn't go step by step through everything, but
>>the Ultimate Guide does - - I've used it a lot and I find it very
>>helpful.
>>
>>If anyone has anything to add that I have forgotten, please do so.
>>I'm still trying to get my feet wet with this stuff, but I like to try
>>to help whenever I can...
>>
>>Alex P. Gates
>>-----Original Message-----
>>From: fx.php_list-bounces at mail.iviking.org
>>[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Gary Redmond
>>Sent: Wednesday, September 06, 2006 3:19 AM
>>To: FX.php Discussion List
>>Subject: [FX.php List] carry data over
>>
>>Ok I have a form that asks a user for their name etc, when they press
>>submit it adds the details to a new record however, I would like to have
>>
>>another form on the next page that allows them to add more to the
>>record.
>>
>>
>>_______________________________________________
>>FX.php_List mailing list
>>FX.php_List at mail.iviking.org
>>http://www.iviking.org/mailman/listinfo/fx.php_list
>>
>>
>>
>>
>>_______________________________________________
>>FX.php_List mailing list
>>FX.php_List at mail.iviking.org
>>http://www.iviking.org/mailman/listinfo/fx.php_list
>
>_______________________________________________
>FX.php_List mailing list
>FX.php_List at mail.iviking.org
>http://www.iviking.org/mailman/listinfo/fx.php_list


-- 

Jonathan Schwartz
FileMaker 8 Certified  Developer
Associate Member, FileMaker Solutions Alliance
Schwartz & Company
jonathan at eschwartz.com
http://www.eschwartz.com
http://www.exit445.com
415-381-1852



More information about the FX.php_List mailing list