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.

Featured Replies

I am using Filemaker Pro 8.5 (MacOS 10.4.11) which for various reasons I am not in a position to upgrade at present.

I have created a simple database of only one table.

My purpose, which I have successfully achieved, is to manipulate and output data from this database (which only I use) as a set of 50 textfiles.

The fields in the database include:

category_number

export_text

I have a set of 50 scripts, named 1 to 50, each in the following form, plus a script called "PerformAll" which calls all 50 scripts one after the other.

Each of the 50 scripts contains only the following:

Perform Find [Restore]

Sort Records [Restore; no dialog]

Export Records [No dialog;"filename";Unicode (UTF-8)]

The "Perform Find" step searches for a specific value in the field 'category_number' and the "Export Records" step exports the found and sorted set as a textfile called "filename".

This all works perfectly, and if I have for example 100 records in my database where the 'caegory_number' is say 8, then the file called "8" will contain 100 'paragraphs', each consisting of the content of each of the 100 'export_text' fields, each ending with a "return".

WHAT I NEED TO ADD TO THESE 50 FILES IS: a single line of text added **_only once_** as the 1st line of each textfile, saying what the Category is. So, for example, category 8 might be "Houses".

Excuse my ignorance, but I cannot think how to get this data to appear only once in each file!

Can someone please help me? Thank you.

WHAT I NEED TO ADD TO THESE 50 FILES IS: a single line of text added **_only once_** as the 1st line of each textfile, saying what the Category is.

One way to accomplish this would be to export as XML and use a custom XSLT stylesheet to build the exported text file.

Another option is to export as you do now, and use AppleScript or a plugin to add the line to the exported file.

BTW, you could replace the 50 scripts by a single one - using the category as the script parameter.

  • Author

Thank you, comment. The idea of an Applescript appeals most to me.

I guess what I need is a "perform Applescript" step added to the end of the FM script, which opens the file which has just been created and adds the line to the file, then closes it.

Do you know enough Applescript to be able to tell me what it should look like?

Thanks in anticipation. Philip

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.