Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Exporting String With Tabs

Featured Replies

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

split the field in several fields using the internal (option-tab) as a separator, then it works....

GetValue(Substitute(field;,q|);1) ....

  • Author

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

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.

  • Author

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

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.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.