Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum
Sign in to follow this  
Peardog

Newbie Question

Recommended Posts

Peardog

Hi Folks..

Question... I have this large text file wich looks like this:

Org: SymCo

Address: 220 Smith St.

City: TestTown

State: PA

Zip: 12345

And that goes on for each differnet Company (hundreds of them). Between each Field (which is what I want them to be) there is a carriage return (New paragraph) so it all looks left justified.

 

I want to take each Category (ex. State:) and make that a single field and import the entire text as a single database ...

The problem is that I cannot define the categories so that Filemaker will ID them on Import.

Any ideas??

 

Thanks!

 

Rob

Share this post


Link to post
Share on other sites
CobaltSky

Hello Rob,

What I suggest you do is set up an ancillary field into which to import the whole block of text, then set up a script which loops through the records setting the appropriate portion of the imported text into each separate field, then deletes the text from the utility field.

 

For instance, to extract the Org: value, you would use the command:

 

Set Field ["Org", "Middle(UtilityField, Position(UtilityField, "Org:", 1, 1) + 5, Position(UtilityField, "¶", Position(UtilityField, "Org:", 1, 1), 1) - Position(UtilityField, "Org:", 1, 1) - 5)"]

 

and simularly, to extract the address you would use:

 

Set Field ["Address", "Middle(UtilityField, Position(UtilityField, "Address:", 1, 1) + 9, Position(UtilityField, "¶", Position(UtilityField, "Address:", 1, 1), 1) - Position(UtilityField, "Address:", 1, 1) - 9)"]

 

...and so on. NB I've provided these formulae in v6 syntax but they will work in v7 (although ideally they would be optimized with the use of the Let( ) function in v7).

 

If you will only ever need to do this once, then after the process is complete, you could delete the utility field and the script - but otherwise they could stay in the file for future use.

Share this post


Link to post
Share on other sites
Lee Smith

Alternately, you could prepare your data before you try to import it, by manipulating it in a text editor so that it will import smoothly.

 

I use BBEdit as my choice for this task, because it can do Grep Pattern Finds and Replaces using Regular Expressions. I believe there is an equivalent for Windows called TextPad, but someone else that is familiar with it will have to chime in.

 

Let me know off list if you want additional information on how this works.

 

Lee

Share this post


Link to post
Share on other sites
Lacy

I am VERY new to FileMaker, and I am trying to set up a relational database. This database is for an aesthetics laser business which has 2 platforms. One does only cellulite reduction, the other is an elos laser and has multiple functions. I think i have a handle on my tables for Customers and Treatment Areas, but I start to have trouble when I try to figure out how to track each treatment done, and the settings for that treatment. These treatments are multiple. Usually it takes 4 or 5 sessions to achieve the lasting results, so I need to track them individually. They can also include multiple treatment areas in one session.

I'm sorry if this seems like a simple thing and I should be able to figure it out, but I have been working on it for days and I am getting nowhere.

Share this post


Link to post
Share on other sites
Lacy

Here I am again. I think i have it figured out, but I am unsure if you can use a checkbox field as a key for another table. Anyone know if I can do that?

Share this post


Link to post
Share on other sites
This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use