Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5336 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

  • Newbies
Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

This topic is 5336 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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