[FX.php List] Saving/Exporting records from search results

Jonathan Schwartz jschwartz at exit445.com
Sat Jan 26 16:43:08 MST 2008


Bob,

Understand.  That's what I started with in my first attempt, and have 
it running.  The problem is that it takes over 1 minute to loop 
through 1500 records, and the set could be larger than that.

I'm seeking an alternate, faster and more efficient method.

I'm still trying to figure out if ggt has another method using a 
relationship, or, if ggt is referring to something else.

I did think of another method while in the shower (my favorite 
get-away think tank).  I could create a single record in FMP 
containing a single field with each key field value needed. Then I 
could invoke an FMP script to loop thru and break out the values into 
separate records. This is similar to my original method #2 that 
involved Export and Import, except that the import and export 
functions aren't supported for the web.

J

At 4:52 PM -0600 1/26/08, Bob Patin wrote:
>That's what I was suggesting... loop thru found set, create a new 
>record with the key field in it for each of your found records.
>
>Then, lookups populate the fields as each record is created...
>
>BP
>
>
>On Jan 26, 2008, at 4:22 PM, Jonathan Schwartz wrote:
>
>>I am totally not getting it on this one.
>>
>>A query is performed in php: $search
>>A set of records is returned in php: $searchResult
>>Target DB in FMP is called "recipients.fp7.
>>
>>So far, I am looping thru #searchResult  with new instance FMNew to 
>>create new record with key field.
>>
>>This is working...but takes a lot of time to generate 1500 
>>individual queries to create the record.
>>
>>Is this different than your suggestion?
>>
>>J
>>
>>
>>
>>
>>
>>At 4:04 PM -0600 1/26/08, Bob Patin wrote:
>>>Jonathan,
>>>
>>>I'd probably use a relationship to populate a new record:
>>>
>>>loop thru the found set, creating a new record with just the keyID 
>>>from the first record. Do a lookup to populate the rest of the 
>>>fields...
>>>
>>>So new record gets the keyID field value from table 1, table 2 
>>>uses that keyID value to lookup the values for all the other 
>>>fields.
>>>
>>>Bob Patin
>>>Longterm Solutions
>>>bob at longtermsolutions.com
>>>615-333-6858
>>>http://www.longtermsolutions.com
>>>Member of FileMaker Business Alliance and FileMaker TechNet
>>>
>>>  CONTACT US VIA INSTANT MESSAGING:
>>>     AIM or iChat: longterm1954
>>>     Yahoo: longterm_solutions
>>>     MSN: tech at longtermsolutions.com
>>>     ICQ: 159333060
>>>
>>>--------------------------
>>>Contact us for FileMaker hosting and programming for all versions 
>>>of FileMaker
>>>PHP * CDML * Full email services * Free DNS hosting * Colocation * 
>>>Consulting
>>>
>>>On Jan 26, 2008, at 2:04 PM, Jonathan Schwartz wrote:
>>>
>>>>Hi Folks,
>>>>
>>>>This is a scaled-down repeat of a post from earlier this week.  I 
>>>>didn't get any replies to that post, and I'm still seeking a 
>>>>solution.
>>>>
>>>>In short, I need to be able to export the records from a 
>>>>user-generated query into a second table. I have tried 2 methods. 
>>>>One is slow. The other doesn't work.
>>>>
>>>>#1: Run a php script to loop through each record with FMNew. It 
>>>>took over a minute to generate 1200 records and pegs the meter. 
>>>>This is with the fields reduced to just the record ID.
>>>>
>>>>#2: Run a script to have FMP export the records and then import 
>>>>into the second db.  I now realize that this won't work because 
>>>>neither Export or Import are Web Compatible.
>>>>
>>>>So I'm back to #1... or another method I haven't thought of yet.
>>>>
>>>>Any suggestions?
>>>>
>>>>Jonathan
>>>>
>>>>
>>>>--
>>>>Jonathan Schwartz
>>>>Exit 445 Group
>>>>jonathan at exit445.com
>>>>http://www.exit445.com
>>>>415-381-1852
>>>>_______________________________________________
>>>>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-381-1852
>>_______________________________________________
>>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-381-1852


More information about the FX.php_List mailing list