1 of 1 people found this helpful
Completely possible, just use the Char() function to apped the control characters you need. char(13) is a return I believe, char(9) is a tab. These are the ASCII values, so you can look them up and plug in what you need.
Worked great used char (13 ) for CR and Char ( 10 ) for line feed thanks
However what i mentioned above only works with a field within a record, not with say export all records, do you have any idea ?
Much oblidged !!
OK, you can try a couple differnt things, I'm not quite sure how your doing your export.
Are you using a standard export format and exporting all your records? Or are you exporting a single field?
How are you creating your fixed length record data?
Typically I would assemble all my data into a single $variable then put that into a utility record into a single field and then export that single field.
You would build your data out in the $variable by looping through your records, and concatenating your rows into the variable, ending each line with the appropriate control codes.
If your using the standard record import, it's a little trickier, because Filemaker is going to attempt to append a standard CR a the end of each line.
One way of handling this is to put a calculated field into your table with a unused character or string of charachers (like a tilda, or a dot). Then after you export the file, use an editor or a utility to find the character and the regular end line, and replace with what you want.
Last, if you need more flexibiliyt, take a look at Troi's text file utlity plugin which will give you many options not built into Filemaker.
Thanks for the reply, was away for a couple of days but didn't got the problem solved, i looked at Troi's text file which looks great, but i don't think it will help me out at this point it's probablly something really simple but i'm fairly new to this. I made a sample database so i can explain the problem more visually, perhaps better. Perhaps it is the relationships ?
I have a db with 4 tables, Basic, Mandatory, Common en Product. In the Commonlayout i collect all the fields from the other three tables where Product is a portal with multiple records.
I've added two records for Basic and Mandatory and 7 records for the Productportal (3 for the first customer and 4 for the second customer).
I want to export all the data for the two customers with al productrecords also in a specific order: it would look like this:
It would be exported to a txt file with no delimeter such as a tab or comma but pure plain text with fixed lenght wide.
I attached the sample file perhaps this makes it more clear
I would be very much oblidged if you or anyone else would have to time to look at it !!
There are some customfunctions on dunning.com which might suit this purpose...
Hi Lyndsay and Beverly thanks for your quick replies, much oblidged!
I looked on Dunnig but didn't really found what i was looking for but will take another look, thanks
@Beverly Thanks these will help out ! This was what i was looking for formatting wise
However besides the formatting which i will work out thanks to Beverly, i don't seem the get the data from the Product table pulled together with the other three tables, i think i'm overlooking something but as said i'm a newbie on this.
Could you take a look at the sample perhaps ? Thanks!!
Herewith a solution to export the data;
I made a script that loops through the records and fills a variable with the data you need. Then puts the complete text in a global field
to export it to a text file.
Hope that helps,
Ruben van den Boogaard
ExampleExport.fmp12.zip 54.6 K
Hi Ruben en Christank,
SUPER that's it, @Christiank sorry couldn't give another correct answer
@ Ruben are you dutch ?
Hi Ruben and ChristianK,
Both your solutions work great on a Mac but on PC Windows 8 with FM pro 12 i don't get an enter after the lines, is this because of Char ( 13 ) ?
Thanks for your reply
You could also use the ¶ instead of the Char(13) , so you have to replace the Char(13) with "¶"
FileMaker translates the ¶ correctly on Windows, where you need a return+linefeed
And yes, I am Dutch.
Ruben van den Boogaard