Jump to content
Server Maintenance This Week. ×

Export file from data


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

Recommended Posts

Hi, I am trying to export a registry file, from Filemaker, with a line or two being data that can vary.

Does anybody know of any good methods to do this? The main problem is that exporting field contents does not include line breaks. So the closest I have come is to export a whole table, with each record becoming a separate line of the code. However, I am unable to include the variable data from the database, by a relationship. The closest I have come to this is by creating a script that creates a variable from the data in question, goes to the relevant record number in the code table, and copies the variable here. The problem with this is all the screen flickering what with changing layouts.

Any ideas for a clean solution?

many thanks

Link to comment
Share on other sites

nearly there, I created a global field that would contain the variable data, and a calculation field, which would bring in the data from the global field if the value in the original code field was set to a particular value, otherwise, it just brings in the value from the code field.

However, i cannot export this calculated field, how do i go about exporting calculations?

cheers

Link to comment
Share on other sites

The main problem is that exporting field contents does not include line breaks.

But you can, (filemaker uses unicode and linebreaks are not Carraige returns) you need to add carriage returns to you script that filemaker exports.

I have Several examples of this posted on the forums. The one for changing printers exports a VBS script from a FM Field and changes a registry entry (among other things).

(hopefully that particuler file will be gone when I upgrade to 9.0. If the changePrinter function works the way I think it does it will be.)

Link to comment
Share on other sites

thanks for the reply, I'm having trouble pinpointing the bit in the script that inserts the carriage returns, could you point me to it?

thx

Link to comment
Share on other sites

It doesn't exactly Insert them, but if you look at the

Set Variable ($VBS;Value"Set....

script step it will show you the format needed. Every line in the script includes a carraige return.

It's really not that hard, you just need to display the carrage return within the field as text. It can't be entered into a field directly but can be put there from withing a script.

Link to comment
Share on other sites

it still exports with the square character instead of the carriage return, in fact on the script in your example it does the same thing??

Link to comment
Share on other sites

Wierd, I see what you mean. I does Look that way, at least in notepad. But I also use a Free Text Editor Called ConTEXT when I open it there the Carraige returns are Perfectly Formated. (You might try opening it in Word and Showing all the formating Charecters.)

The vbs scripts that I exported are exported from a single field and they run. (They would not if those returns were not there.)

I think the problem is that filemaker exports Uni-Code and windows expects Plain Text. It does make things look wierd sometimes, but it does work.

Link to comment
Share on other sites

If you need it to show up in plain text you can insert the returns this way

text::text1 & "¶"

the tells it to use it as a charecter rather than a Format in the field. I think You will find that uni-code formating works in most situations. Just get somthing you can look at it with. (Notepad doesn't do it)

Edited by Guest
Dosn't create a line break after exported.
Link to comment
Share on other sites

no i can't get ¶ to show as a line break in plain text. Yes for vbs, the square symbols do appear to be enough, as with registry files, however, I am trying to make a phonebook (PBK) file, these seem to require actual line breaks in plain text.

Link to comment
Share on other sites

  • 10 months later...

I have accidentally found a metod of achieving proper line breaks in an exported file, might be of interest...

if you import a file using the import from folder (import file may work i'm not sure), then when you 'export field contents' it will still have those line breaks. So in between you could edit it by created a calculation field that references this field, could use the substitute function.

Afterward you may have to to use a send event script step that would look like

"cmd /c type 'orig' > 'converted.ext'"

This will convert it to unicode format i believe

hope this helps someone!

Link to comment
Share on other sites

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