Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Exporting each record to separate file

Featured Replies

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?

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

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

  • Author

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.