Using Find Command with Items....?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jpatten
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 45
Joined: Tue May 06, 2008 11:24 pm

Using Find Command with Items....?

Post by jpatten » Fri Jun 06, 2008 7:30 pm

Hi All...

I'm trying to find data in large field and sort it out by breaking it down into items and then searching each item in a repeat. Here's what I have:

on mouseUp
set the itemDel to "@"
put cd fld "grades" into studentData
put the number of items of studetData into dataInput
put cd fld "student" into targetStudent --the find field
put 1 into X
repeat for dataInput
put item X of studentData into TargetItem
find whole targetStudent in TargetItem
put the result into TextWasFound
if TextWasFound is "" then
put targetItem & Return after StudentReport
add 1 to x
else
add 1 to x
end if
end repeat
Answer studentReport
set the itemDel to ","
end mouseUp

My find result is always "not found." ???

Does anyone see something wrong with this?

Thank you!

jpatten
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 45
Joined: Tue May 06, 2008 11:24 pm

Post by jpatten » Fri Jun 06, 2008 8:28 pm

I think i figured it out... find only works with fields, not variables.

Post Reply