RR and FileMaker

Bruce Robertson bfr at nwlink.com
Thu Apr 3 18:04:01 EST 2003

> Bruce,
> Here is an example. Say I have a field which has something like the following:
> stuff, stuff, AP# 103-837-47, more stuff, more stuff
> Were AP# might be a county parcel number. The 837 might be a county
> tax zone. And I might want to extract  that 837 and make it  a
> separate field. In Transcript I just write:
> on CreateNewField
>  put field 1 into tRecords
>  repeat for each line tLine in tRecords
>    set the itemdelimiter to comma
>    put item 3 of tLine into temp
>    Set  itemdelimiter to "-"
>    put comma & item 2 of  tLine after tLine
>    put tLine & return after results
>  end repeat
>  put results into field 1
> end CreateNewField
> Now I'm sure this can be done as well within FileMaker, but  I have a
> deep seated aversion to the  scripting language in FileMaker.

Your choice, I guess.

Learn to do something extraordinarily simple in a widely used application
that you apparently already own. Learn fundamental database concepts. Learn
basic ideas like importing standard delimited data formats; a concept that
applies across a wide variety of applications, like Excel, FileMaker, etc.
Or continue to ensure that your horizons aren't accidentally widened.

> As I said, I first have  to  save the file as text, do my Transcript
> thing, and then import it back into FileMaker. Tedious but, for me,
> better than working in FileMaker.

You are fooling yourself. I hope you're not making somebody else pay for
your time.

You are apparently importing a comma delimted file. There is ZERO scripting
required in FileMaker to accomplish this. Just choose file, import, comma

If you import the raw comma delimited data into fields Stuff1, Stuff2,
Stuff3, Stuff4, Stuff5 then you can make a calculated field APMiddleNumber =
middlewords(Stuff3, 4,1). 

More information about the use-livecode mailing list