Find string "xxx" in field yyy OF THIS CARD

dunbarx at aol.com dunbarx at aol.com
Thu Feb 2 12:33:30 EST 2012


Jim.


But LC natively can restrict finds to a single field:


find yourText in fld yourFld


Francis needs to restrict his find to a specific card. I assume there are more than one field on that card, and that other cards have fields that may contain the text he wants.


I can think of several ways to do this, none of them onerous, just not natively.


Craig



-----Original Message-----
From: Jim Hurley <jhurley0305 at sbcglobal.net>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Thu, Feb 2, 2012 12:28 pm
Subject: Re: Find string "xxx" in field yyy OF THIS CARD


Hi Francis,

I have used this, suggestion by a list member some time ago, to restrict the 
find to a specific field.

You might substitute the card id in place of the field id.

on mouseUP
   put the value of the clickline into tText 
   put the id of field "theText" into tNum
   find empty
   find  string  tText in field id tNum
end mouseUP

Jim


> Hi from Beautiful Brittany,
> 
> I have been having problems with the "find" command.
> In a stack with multiple cards, I want to find specific
> strings on a card of my choice (the card currently displayed),
> and NO other.
> 
> If I code "find string xxx in fld yyy of this card" ..
> 
> doesn't work.
> 
> If I look in the dictionary for the "find" command, I find no
> information concerning a search on a specific card.
> However, a user comment (from Craig) shows that we can use :
> 
> find yourtext in field yourfield of card cardOfInterest
> 
> by which I understand that you can define a specific
> card by its number.  This does not work either.
> 
> Has anybody had problems like this, or have I reached
> my first LiveCode "bug" ?
> 
> Is there any way of restricting a "find string" to a
> specific card. I'm on LiveCode Build 1080 Version 4.5.0
> 
> -Francis
> 
> After nearly 50 years of dedicated computing, I still
> find that Windows is a pane ......    :>)
> 


_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

 



More information about the use-livecode mailing list