June 1, 200619 yr I am wondering if anyone has experienced a situation similar to this. Any help or guidance would be appreciated. I have around 25,000 records in my current database. approximately 17,000 of these records have text in a field called "text4infor". I want to find, then export all 17,000 to their own *.txt or *.html file labeling each file as "record#.txt". I know this will take some pretty fancy scripting but it is necessary for an up coming project of mine. Can anyone please help me with this? Thank you all in advance for viewing this post and to those of you offering assistance. Jp.
June 1, 200619 yr FileMaker 8 has made this pretty easy, especially in your case since you only need to export one field. See "Creating file paths" in FileMaker help. Loop . Set Variable [$path ; "file:/folder/folder/" & MyTable::MyRecordNumberField & ".txt" ] . Export Field Contents [ MyTable::text4infor ; $path ] . Go to record [Next, Exit after last] End Loop Note: the variable name MUST begin with the $ symbol. Note: Don't use Get(RecordNumber), since it varies with the found set and sort order; use Get(RecordID), or even better your own auto-entered ID field (MyRecordNumberField in the example above). Do you need help with the Find part of the script?
June 2, 200619 yr Author TOM, Thank you so much for your help on this. I have created the script as you suggested to the best of my ability but now i am receiving a error message. " "xxx.txt" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a differnet disk. " Have you seen this before? my script is as follows: Loop Set Varriable [$path; Value:"C;/SANDEEP/FMtext/" & ITEM_INFO::ROITNO & ".txt" Export Field Contents ITEM_INFO::TEXT4infor; "$path"] Go to Record/Request/Page [Next; Exit after last] End Loop Can you see anything wrong here? Please let me know if you find any thing. Thank you so much again for your advice/. James
June 2, 200619 yr Author I got it. THanks again Tom, i should have took ALL your advice and read the help section. It appears i was trying to save to a local drive and instad, all i need to do was export to a network share on my server. THansk again Tom and anyone who has stopped by to read this post All is good now.
Create an account or sign in to comment