nfregistrar Posted November 26, 2006 Posted November 26, 2006 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
cjaeger Posted November 27, 2006 Posted November 27, 2006 split the field in several fields using the internal (option-tab) as a separator, then it works.... GetValue(Substitute(field;,q|);1) ....
nfregistrar Posted November 29, 2006 Author Posted November 29, 2006 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
comment Posted November 29, 2006 Posted November 29, 2006 I am surprised to hear it works for you in version 7 - because it shouldn't (and it doesn't in mine). When you export to a tab-separated file, the tab character is reserved for separating fields. Tabs in fields are converted to spaces.
nfregistrar Posted November 29, 2006 Author Posted November 29, 2006 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
comment Posted November 30, 2006 Posted November 30, 2006 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.
Recommended Posts
This topic is 6568 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 accountSign in
Already have an account? Sign in here.
Sign In Now