yep, and you could use ListAppend(indexList,listfind) so you needn't have
the string comparison for the comma?

-----Original Message-----
From: Giles Roadnight [mailto:[EMAIL PROTECTED]
Sent: 17 October 2003 13:43
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] List Question


You may also have to do this instead:
listfind(whatI'mlookingfor,list,currentIndex+1)
or you will probably just find the first position for ever and obviously
you won't want the current index in there the first time you do a
listfind

Giles Roadnight
http://giles.roadnight.name


-----Original Message-----
From: Giles Roadnight [mailto:[EMAIL PROTECTED] 
Sent: 17 October 2003 13:40
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] List Question

currentIndex = listfind(whatI'mlookingfor,list)
indexlist = ""
while(currentIndex <> -1){
        listfind(whatI'mlookingfor,list,currentIndex)
        if(indexlist <> ""){
                indexlist += ","
        }
        indexList += listfind
}

Something like that? Syntax is probably wrong as not done CF for a
while!

Giles Roadnight
http://giles.roadnight.name


-----Original Message-----
From: Paddy McKay [mailto:[EMAIL PROTECTED] 
Sent: 17 October 2003 13:21
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] List Question

Hi All,

Maybe I am suffering from brain fade again (stop sniggering Roadnight!),
but how can I find the all the positions that a value might appear in a
list.

Basically, I get a list of values from a query, but the value I am
looking for may appear more than once. If I do Listfind it returns the
position of the first instance, but how do I get the positions of the
rest of them? 

Any pointers appreciated.

paddy
-----------------
Paddy McKay
Scottish Property Network
[EMAIL PROTECTED]
Tel: 0141 561 7300
Fax: 0141 561 7319


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]
DISCLAIMER: This e-mail is confidential and may also be legally privileged.
If you are not the intended recipient, use of the information contained in
this e-mail (including disclosure, copying or distribution) is prohibited
and may be unlawful.  Please inform the sender and delete the message
immediately from your system.  This e-mail is attributed to the sender and
may not necessarily reflect the views of the Patsystems Group and no member
of the Patsystems Group accepts any liability for any action taken in
reliance on the contents of this e-mail (other than where it has a legal or
regulatory obligation to do so) or for the consequences of any computer
viruses which may have been transmitted by this e-mail. The Patsystems Group
comprises Patsystems plc and its subsidiary group of companies.

-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to