finding data in field

Sarah Reichelt sarah.reichelt at gmail.com
Sat Jan 6 16:01:23 EST 2007


On 1/7/07, Robert Mann <robmann at gp-racing.com> wrote:
> I have a field of names separated by tabs
>
> Label tab fcdqty
> Label tab fcd1qty
> Label tab fcd3qty
>
> What I am trying to do is find the second item then once I find it select
> the first item in that line, below is what I have tried but does not work
>
> find word tcolname in fld "fieldmatch" - -this seems to work
>
> put the selecetedline in fld "fieldmatch into tline - - this is where I
> think my error is just not sure what to change
>
> put item 1 of tline into tncolnames

When finding strings in order to so something with that information,
rather than just displaying it, I prefer to use one of the offset
functions. In your case, here is what I would use:

put lineOffset(tab & tcolname & cr, fld "fieldmatch") into tLine
put item 1 of tline into tncolnames

HTH,
Sarah



More information about the use-livecode mailing list