[FX.php List] [OFF] Duplicate Record in different Table

Jonathan Schwartz jschwartz at exit445.com
Tue Jan 6 13:47:32 MST 2009


It's been pounded in my head not to use scripts.

That being said, I went ahead and did it the brute force way.

I just know that S Winter will come along and give me a 6 line jewel 
when the sun rises in London.

J

At 12:32 PM -0800 1/6/09, Joel Shapiro wrote:
>Hey Jonathan
>
>How 'bout a script in FMP?  Might be easier/faster...
>
>-Joel
>
>
>On Jan 6, 2009, at 11:51 AM, Bob Patin wrote:
>
>>I think your question relates to FX just as well...
>>
>>Assuming you can store an array in a session variable (I've never 
>>tried), I'd do it that way, but the problem there is remembering 
>>which array element equates to which field.
>>
>>I like to be able to look at my code a month later and immediately 
>>grok what I was doing; for that reason, and some will undoubtedly 
>>disagree with me, I go the long way around sometimes and put POST 
>>elements into variables, so that I can use them in multiple places 
>>on the page without having to re-grab the POST value.
>>
>>So I'd probably do it the most obvious way, and create 50 session 
>>variables, all with the similar names (or same) names as the fields 
>>they pertain to. That way, when you need to plug them back in for 
>>whatever reason, you don't have to scratch your head and remember 
>>what array element #15 equates to...
>>
>>Bob Patin
>>Longterm Solutions LLC
>>bob at longtermsolutions.com
>>615-333-6858
>>http://www.longtermsolutions.com
>>Twitter: bobpatin
>>iChat/AIM: bobpatin
>>FileMaker 9 Certified Developer
>>Member of FileMaker Business Alliance & TechNet
>>--------------------------
>>FileMaker hosting and consulting for all versions of FileMaker
>>PHP * Full email services * Free DNS hosting * Colocation * Consulting
>>
>>
>>On Jan 6, 2009, at 1:36 PM, Jonathan Schwartz wrote:
>>
>>>[OFF]...because this question is about the API, although the 
>>>answer might be the same in fx.php.
>>>
>>>I need to preserve a copy of record data before a web user edits 
>>>the record...in case the data needs to be restored.
>>>
>>>Upon login, I want to query the layout and then immediately turn 
>>>around and create a new record in a second table, using all the 
>>>data returned by the query.   Assume that the fields in both 
>>>tables are identically named.
>>>
>>>Sure, I could write each of the fields to a separate SESSION 
>>>variable and then create the add query using those fields, but 
>>>with 50 or so fields, that's not pretty.
>>>
>>>I know there is a way to simply take the array returned by the API 
>>>and reverse engineer it to create the add new record query....but 
>>>I'm at a loss.
>>
>>_______________________________________________
>>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
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-370-5011


More information about the FX.php_List mailing list