Re: Splitting a text string into fields
- From: "Bill Marriott" <wjm@xxxxxxx>
- Date: Mon, 28 Nov 2005 13:02:53 -0500
Because it's one field, one calculation. And if he needs to create separate
records from those values, it's easier to split the repeating field during
import.
Bill
"42" <nospam@xxxxxxxxxx> wrote in message
news:MPG.1df4e2bb8418ee46989de3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Seems a little over thought...
Why not just
p1 = (MiddleWords(myInput,1,1)
p2 = (MiddleWords(myInput,2,1)
p3 = (MiddleWords(myInput,3,1)
I'm not sure I see the point of send it through a repitions construct.
-regards,
Dave
In article <FeWdnZURFZqfpRbenZ2dnUVZ_tKdnZ2d@xxxxxxxxxxx>, wjm@xxxxxxx
says...
> Yes, you can do this.
>
> Given the field myInput(text)
>
> myOutput(calculation, text result, 99 repetitions)=
>
> MiddleWords(Extend(myInput);Get(CalculationRepetitionNumber);1)
>
> Will place each discreet value into a separate repetition.
>
> If you then need to have these repetitions further broken up into
> individual
> fields, you can simply use the GetRepetition function. Example:
>
> p1 (calculation, text result) = GetRepetition ( myOutput; 1)
> p2 (calculation, text result) = GetRepetition ( myOutput; 2)
> p3 (calculation, text result) = GetRepetition ( myOutput; 3)
>
> and so on.
>
> Bill
>
> "Elke Maartens" <take@xxxxxxxxx> wrote in message
> news:291120050339410269%take@xxxxxxxxxxxx
> > Hey gurus, I have a challenge. Well , it's a challenge for me [!] but
> > maybe not for you experts.
> >
> > Input is a text string, containing de facto delineators: such as spaces
> > between words, or markers in a file path, etc.
> >
> > Here's an example. This string
> >
> > i1 3.5 7.5 7460 50
> >
> > needs to be split into fields (p1, p2 ... etc)
> >
> > p1 = i1
> > p2 = 3.5
> > p3 = 7.5
> > p4 = 7460
> > p5 = 50
> >
> > I have no problem writing an 'active' script to do the task, but really
> > I'd like do the whole job with calculations. Partly it's aesthetics,
> > but also because it's faster.
> >
> > My present approach is to split the string into a sequence of separated
> > characters, then have a 'sheepdog script' run along the line and
> > allocate them. That works fine, but it's slow, clunky, and a little
> > unsatisfying! For example, when I recently made a major computer
> > upgrade, I found the increased clockspeed was not reflected in the
> > speed of the script, as (I guess) FMP is working off the disk, carting
> > little bits of data around to do the job, rather than making good use
> > of a faster CPU.
> >
> > Any ideas? Hints? I enjoy a challenge, but I have to admit I'm stuck,
> > and I'd be really grateful for some help even if it is only to put my
> > mind at rest with a negative!
> >
> > TIA
> >
> > Elke
>
>
>
.
- References:
- Splitting a text string into fields
- From: Elke Maartens
- Re: Splitting a text string into fields
- From: Bill Marriott
- Splitting a text string into fields
- Prev by Date: Re: "Soundex" in FileMaker ?
- Next by Date: Re: Duplicating mulitple records
- Previous by thread: Re: Splitting a text string into fields
- Next by thread: Re: Splitting a text string into fields
- Index(es):
Relevant Pages
|