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

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

Recommended Posts

Posted

I'm not sure I understanding what you are trying to do.

To start with, when you are working with text files, it is sometimes easier to set the file up before you try and introduce it to FileMaker.

I'm not sure whether you are Trying to put a bunch of text into one field or have it Parse out to several fields.

If you can post a sample file of the text and your FM file, it might speed things up considerably.

Lee

Posted

I'm sure this could be done with an XML export. Not sure exactly how though ;(

Posted

Was XML or "Export Field Contents" Available in FMP v5? Export Field Contents also does not let you export actual returns (CRLF), at least with windows based systems. This may or may not be a problem depending on how and where the exorted data is to be used.

Its still unclear what the OP means by "Export fields in a certain position". How about a sample of how the table/records are setup and the intended output you expect. For example:

I have a table with two fields - Length(L) & Position(P), and many records.

record 1 - L="A13" P="1-13"

record 2 - L="A11" P="14-24"

I want this to export into a text file as follows:

LENGTH POSITION

A13 1-13

A11 14-24

If the above was the case I would say create a calculation field = Length & " " & Position then export the calculation field. The trick would be to get the Header text ("LENGTH POSITION"), which can be done by typing your Header text into the appropriate field in a new record. Then the data needs to be sorted so the Header Text record is first.

Posted

No Export Field Contents in 5. XML is in 6, not sure about 5.

If you create a calculated field that produces the string you want to export then you can export just that field.

If you choose the MER format it will included the name of the field as the first row. The value from each record will be surrounded with quotes though.

To have no quotes around the text, use the TAB export format but then you won't have the field name as the first row (unless you create a dummy record with that value in it).

Posted

What if the text inside those fields isn't the right lenght ?

For example:

You have the first field to be exported as fixed lenght of 13 chars, but you have "APPLE" inside that field...

Can we assume to put blancks before ?

or after ?

or we have to put "0" chars ?

Posted

What you need to do is pre-fill between each column with spaces. Here is a sample file which shows how to pull it off.

If you look at the cExportCalc, you will see how it's done. HoldExport and gImportResult are only used to show you the resulting text data and wouldn't be needed in a real solution. :wink2:

You can then put your cursor in that yellow Results of Import and see how the spaces in the calc (inside the "") pad with spaces to make everything line up. Then just take your numbers and match them accordingly with the fields. And you should use Courier or other non-proportinal font.

LaRetta

ExportText.zip

This topic is 6852 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.