Jump to content

Exporting String With Tabs


nfregistrar
 Share

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

Recommended Posts

I recently upgraded from 7 to 8.5. A script that I have been using for a long time in 7 no longer works now that I am running under 8.5. The step that fails is: Export Records["data.tab";Windows ANSI]

File Type is Tab-Separated Text Files (*.tab)

Field Export Order is string1.

String1 is Type text with a string of data separated by tabs in the field. It has only one record. When it writes to data.tab the tabs are lost. If I stop the script just before the export step and cut and paste string1 to data.tab, and then skip the export step then the data works in subsequent parts of the script that depend on the tabs being there. :)

Dave

Link to comment
Share on other sites

I sorry, I don't understand what you are telling me to do.

Is there a difference in FP8.5 that prevents it from writing a text string like: data1data2 etc. to an external file using the Export Records command with out losing the tabs? There are 39 pieces of data with a tab between each.

It still works from the same database when I run it in FP7 instead of FP8.5.

Dave

Link to comment
Share on other sites

I checked it again. It works in FP7.

To the best of my knowledge this is what I do. It has been done over a 1000 times in the last year with out a hitch on both a PC and a Mac:

One takes a raw data stream from a secure page on our web site, with 39 fields of data per record and copies it to the clip board. A Filemaker script in the main file is then run which does a little housekeeping and then calls another script in another FileMaker file which pastes the clip board to one of its fields. It strips out one record by looking for an end of record marker and puts that record into another of its fields. It then operates on that record in the field and finds all the field data separators and replaces them with tabs. (The "replace" symbol look like a square on my PC). It then exports the resulting field into an external file called data.tab. (When I use fp7, data.tab definitely has tabs in it but not in fp8.5.) Control returns to the main script which imports the data from data.tab as tab separated data into 39 fields in a new record in the main file. This repeats until all the records have been done.

When I do it in fp8.5, all 39 fields pile up in the first field as there are no tabs to separate them out.

Anyway, if I can't make it work in fp8.5, I will need to either stay with FP7 or find another way to make it work.

Dave

Link to comment
Share on other sites

Is it possible that your version 7 is not patched up to 7.0v3? You might be "enjoying" a bug in earlier release.

In any case, I think you should be able to create the required fields and records directly in Filemaker, without such a laborious round-about. Doesn't seem very secure either, with the data going through both the clipboard and an external text file. I would define 39 repeating calculation fields in the temp file (all using the same formula, changing only the number of the field to extract). Then you can import with the option to split repeating fields into separate records.

Link to comment
Share on other sites

This topic is 5783 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
 Share

×
×
  • Create New...

Important Information

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