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

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

Recommended Posts

Posted

Hi

Please can anyone give me any advice on this.

Firstly I am working in Windows.

I have a field in my database called filetext

This is a calculation. For ease of explanation I have cut this right down so imagine the calculation is filetext="Line1¶Line2"

In FileMaker this shows fine as...

Line1

Line2

I then export this to a .req file (basically a text file).

I have tried all sorts of different combinations of exporting options such as exporting as a tab delimited file, exporting as a csv file etc

I am outputting the character set as Windows(ANSI) and have tried it with applying current layouts data formatting tick box checked and unchecked.

When I open this in notepad it shows as:

Line1Line2

I need it to apply the carriage returns, not add in this character

I tried changing the caclulation so it read...

FileText="Line1¶

Line2"

So manually adding a carriage return

This results in exactly the same but adds a space character after the so...

Line1 Line2

I am currently exporting as a tab file, if I export as csv, it adds " before and after the text...

"Line1Line2"

Anyone have any ideas on how to export this onto seperate lines?

Many thanks in advance

Posted

Some of the characters in the post do not show

The result in the text file is

Line1[strange character here]Line2

strange character looks like the circle symbol with an arrow pointing up at 45 degrees - i think it is the gender sign for a male

Posted

The strange character you see is a vertical tab (ASCII code 11). When you export to one of the text formats (tab-separated, csv or merge), carriage return characters are used to separate records. Therefore Filemaker converts carriage return characters in fields to another character.

Possible solutions:

1. Use Export Field Contents (each record to a separate file);

2. Export as XML with a suitable stylesheet;

3. Use a plugin that can write/append to a text file;

4. Import your records to a temp table where each line will be a separate record.

See also:

http://fmforums.com/forum/showtopic.php?tid/192649/

Posted

Many thanks for your help

I tried exporting the field contents and althought the character no longer shows, it still does no apply the carriage return

So, I am lookign at the xml method you mentioned. I have taken a look at the post you linked to and seems this will work perfect. I downloaded the example in that post and am looking at the stylesheets. XML and stylesheets is not something i have got into yet so i was wondering if you could help me to understand the stylesheet.

the stylesheet includes...

<?xml version="1.0" encoding="utf-8" ?>

-

-

What I am wondering is about the links to 2 sites in the stylesheet. What is this reference for?

And if these sites were unavailable at any point, would this case issues with my xml export?

Many thanks for the help again

Ed

Posted

I tried exporting the field contents and althought the character no longer shows, it still does no apply the carriage return

Are you sure? How are you testing this?

What I am wondering is about the links to 2 sites in the stylesheet. What is this reference for?

These are not strictly links - more like text strings to uniquely identify the declared namespace.

And if these sites were unavailable at any point, would this case issues with my xml export?

No. There's no attempt by the XSLT processor to connect to them.

Posted

Thanks for the help with the xml stylesheet.

I am testing the export field contents as follows

calcfield FileText="Line1¶Line2"

Script:

Export Field Contents [DSreqFile::FileText; "test.req"]

Table is DSreqFile

Field is FieText

Filename it writes to is test.req

Resulting file shows:

Line1Line2

I would much prefer to use the export field contents way so if you can see where i am going wrong it would be very much appreciated!

Many thanks

Ed

Posted

No, I meant how are you testing the result? I believe there is a CR separating the lines, but the application you're using to open the file requires a CRLF to render a new line.

I don't know what a .req file is, but you should test the result with the intended target application.

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