Jump to content
Server Maintenance This Week. ×

Import file with semi-colon delimiter


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

Recommended Posts

I am trying to import a text file that uses a semi-colon as a field delimiter. Filemaker 5.0 only appears to want to use a tab as the delimiter character and there are no options to specify alternate delimiter characters. Other than first running this file through excel, is there any way to get FM 5.0 to import this file directly.

Thanks

Link to comment
Share on other sites

There are a couple of ways.

1. Easy: Import it as tab delimited. Everything will go into one field. Then use a calculated field to convert the colon to a tab using the Substitute function. Export to a temporary file. Then re-import.

2. Slightly Harder: As above import it as tab delimited. Everything will go into one field. Then use a bunch of text calculations (the Position() function) to locate the colon delimiters and split the data into individual fields.

[ October 04, 2001: Message edited by: BobWeaver ]

Link to comment
Share on other sites

Just a followup. If you want to do the parsing with text functions, here are the basics:

Assume the data is all in a field called RawData, and you have a global field gFieldNo that is set to the number of the field that you want to extract:

gDelimiter1Posn = Position(":"&RawText&":",":",1,gFieldNo)

gDelimiter2Posn = Position(":"&RawText&":",":",1,gFieldNo+1)

FieldNdata = Middle(RawData,gDelimiter1Posn+1,gDelimiter2Posn-gDelimiter1Posn-1)

Link to comment
Share on other sites

Bob,

Thanks for the reply. Your first suggestion makes sense and seems like the easiest solution as I can easily automate it.

Your second solution about the tab delimited file is not an issue as FM expects the tab delimiter during import and will populate the correct field from the tab file.

Thanks

Echo

Link to comment
Share on other sites

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