[FX.php List] Edit multiple records/portal / how to pass the data?

Joel Shapiro jsfmp at earthlink.net
Mon Jan 16 10:16:55 MST 2012


Hi Denis

See if my blog post will help.  It shows code for the FM API, but I  
think you'll be able to switch it easily enough to FX.php

The main thing is that you edit each portal field as if it were a  
field in the parent record, but the structure is:

TO_Name::fieldName.childID

Note the dot between fieldName & childID.  childID is the internal - 
recID of each child record.

I'm assuming this structure will work in FX, although I haven't tried  
it.

http://blog.jsfmp.com/post/7642665075/

HTH,
-Joel


On Jan 15, 2012, at 8:50 AM, Denis Somar wrote:

> That fixed it!  Thanks for the clarification Leo!
>
> Does anyone have any example snippets of editing child records  
> through a single parent record/FX call?
>
> Thanks,
> Denis
>
> On Sun, Jan 15, 2012 at 11:40 AM, Leo R. Lundgren  
> <leo at finalresort.org> wrote:
> You need to make the fields arrays by naming them -recid[x] and  
> size[x]. Normally you use a loop to produce the x being 1,2,3 etc.  
> Then in the server side you will see an array in the $_POST data,  
> and can loop that to process the input.
>
> 15 jan 2012 kl. 17.38 skrev Denis Somar:
>
>> Dear FXers,
>>
>> I've read up on the two primary methods of editing multiple  
>> records: one big edit via portals vs. calling FMedit in a loop for  
>> each record.
>>
>> I understand portals is faster.
>>
>> What I'm trying to understand and ascertain is if my edit form with  
>> each record row is passing unique info via Submit/POST that the  
>> results page can manage the edit process.  My edit page's generated  
>> HTML, simplified, looks like this:
>>
>> <form method="post" action"results.php">
>> <tr><td>
>>     <input name="-recid" value="1">
>>     <input name="size" value="xx">
>> </tr></td>
>> <tr><td>
>>     <input name="-recid" value="4">
>>     <input name="size" value="yy">
>> </tr></td>
>> <tr><td>
>>     <input name="-recid" value="5">
>>     <input name="size" value="zz">
>> </tr></td>
>> <input type="submit" value="Save Changes" name="submit">
>> </form>
>>
>> I think the above is correct, but when I print_r($_POST) on the  
>> results page, I see this:
>>
>> Array
>> (
>>     [submit] => Save Changes
>>     [-recid] => 4
>>     [size] => zz
>>     [FoundCount] => 2
>> )
>> 1
>> Thus I'm not sure if editing on my results page will work. Any help/ 
>> thoughts are appreciated!
>>
>> Best,
>> Denis
>> _______________________________________________
>> 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



More information about the FX.php_List mailing list