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.

Newbie - Exporting field values

Featured Replies

  • Newbies

Hello everyone,

I am new to FileMaker and I am trying the FileMaker Pro 11, running windows Vista. The thing is, I have a database and need to export some .txt files in a centain layout to a third party database.

I have the following fields on a table called Results:

Protocol

Password

Name

E-mail

Results

I need it to export just like this for each record set a different file.

Protocol Value

Password Value

Name Value

E-mail Value

Results Value

The thing is, when I use the export field content and use as path the same path as the previous field, it overwrittes the text instead of adding it to a second line. And when I try to make a calculated text field and use the return, the returns do not get exported, so all the values go on the same line.

Could anyone help me with a script or something like this?

Thanks a lot!

Shouldn't you use File>Export rather than Export Field Values?

  • Author
  • Newbies

Well, I am not exporting all fields on the RecordSet. And also, when I try to export as XML, I cannot choose the format it is going to be on txt file, it inserts tags.

And also, when I try to export as XML, I cannot choose the format it is going to be on txt file, it inserts tags.

When exporting as XML, you need to provide your own custom XSLT file (XML stylesheet) that precisely defines what you want to see in your output file.

XML + XSLT is the best tool for the task you describe.

The primary downside to using this method is that it requires you to learn enough about XML stylesheets to accomplish the task. Once you master that, an entire new unrestricted world of file output is available.

An alternate approach that uses FileMaker's export to Tab-delimited ASCII is to...

Create a new table (e.g. OutputText) containing only one text field (e.g. MyOutput).

Using a script, add one record to this table for each line of text you want to write to a file. Put the text of the line into MyOutput.

After you have finished generating all of the lines of text, export all of the records in OutputText to a tab-delimited file. Note that you will be exporting only one field, MyOutput, so that there will not be any tabs delimiting the fields.

Delete all of the records in OutputText so that it is ready for the next time.

Pro: This method avoids the UTF16 issue of Export Field contents.

Pro: This method avoids the awkward handling of ¶ in text fields.

Con: This method is much slower than exporting via XML + XSLT.

Con: This method requires much more infrastructure inside FileMaker with a new table, a new field, and some scripting. The XML + XSLT solution sweeps all of the infrastructure into the XSLT file.

Two more options:

• Have a looping script write the required values into a global field (record-by-record), then export the global field's contents. Keep in mind that the resulting file will be UTF-16 encoded, which some application cannot handle.

• Use a plugin that allows you to append to a text file.

Well, I am not exporting all fields on the RecordSet.

That doesn't matter.

When you export, you have the choice of which fields to export.

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.