Kevin G B Posted March 23, 2001 Posted March 23, 2001 I'm trying to create a script that will export each record in the database to a separate text file. I need to create an individual HTML file for each record in the database (I've stored HTML tags in global fields). I cannot seem to figure out a way to logically do this in the script. I thought the Omit Record/Show Omitted commands were the answer, but I can't figure out a way to then continue looping through the records in the correct order. Any suggestions?
David McKee (Protolight) Posted March 23, 2001 Posted March 23, 2001 Personally, I think an easier/faster way would be a simple loop script that uses a file plugin (www.troi.com or www.geocities.com/SiliconValley/Network/9327/) However, the way I would do this without a plugin would be: Once you have your found set of records, freeze window, go to a layout that only has one field on it, a field that contains a relation key that uniquely ids the record. Do a copy all records step and put the result in a global field (lets call it "found records"). You have a global in the loop that represents which loop number/record you are on. So the first loop it contains "1" the second loop it contains "2" etc.... Lets call it "loop number". Now, inside the loop, set a global field "nowOnThisRecord" = to MiddleWords(found records, loop number, 1). You should have a relationship from nowOnThisRecord to the field that was on the copy all records layout. Inside the loop, do a "Go To Related Records" based on that relation. Then export, and continue the loop from the top. Once you are done, you can even do a go to related record based on a relation from "found records" to that field that was on the copy all records layout. To restore the found set to it's original. Hope this helps! -Dave
Gerd Muller Posted March 26, 2001 Posted March 26, 2001 Remember: global fields can only store 32k text. If You're working with tables and font tags, You'll run out quite fast! I made a similar solution, but used Troi's file plug in, where You can sequently export in one text file without any limits. have fun
Kevin G B Posted March 26, 2001 Author Posted March 26, 2001 David & Gerd, Thanks for your quick response. I think you're both right, I checked out Troi's File Plug-in and that seems to be the simplest solution. I has all the functions I need. Thanks for the advice.
Recommended Posts
This topic is 8992 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now