Use ListFind, which looks for a complete value:
David
> -Original Message-
> From: Angel Stewart [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 15, 2000 6:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Variable IN a list? How to check?
>
>
> Yeah well this
Yeah well this one win, dread.
This man went and did Time Trials on the loop
=)
Now I'm totally confused as to which method to use..
A CFLOOP with a
Or one with a NOT GetListAt.
(bear in mind that for htis particular problem, #DeptID# is a list of
values,not necessarily a single value).
-Gel
> > > Try to use the List functions, or extend the CFIf to be;
> > >
> > > which is faster than the List functions
> >
> > This would only work if the item were not the first or last
> element in the
> > list.
> >
> > Either you would have to use a reg expression or ListFind(list,
> string [,
> >
> > Try to use the List functions, or extend the CFIf to be;
> >
> > which is faster than the List functions
>
> This would only work if the item were not the first or last element in the
> list.
>
> Either you would have to use a reg expression or ListFind(list, string [,
> delimiter]) to search
> >
>
> Avoid using this on lists
>
> The main reason is that if you're looking for "1", then it'll
> return 10, 11,
> 21, etc. etc.
>
> Try to use the List functions, or extend the CFIf to be;
>
> which is faster than the List functions
This would only work if the item were not the first or la
>
Avoid using this on lists
The main reason is that if you're looking for "1", then it'll return 10, 11,
21, etc. etc.
Try to use the List functions, or extend the CFIf to be;
which is faster than the List functions
HTH
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites
ECTED]
Subject: Variable IN a list? How to check?
How would i write this correctly in CFML?
Of course I want to check if the list of values in DeptID are all included
in the list of values in the session.privileges list of values.
Sooo..
deptid may be "11001, 12000,13000"
and session
RE: Variable IN a list? How to check?
>
>
>
>
> Lee Fuller
> Chief Technical Officer
> PrimeDNA Corporation
>
> > -Original Message-
> > From: Angél Stewart [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 13, 2000 9:39 AM
> > To: [EM
Oh..thank you very much..but I figured it out.
I used a CFLOOP to cycle through the session.privileges list and then a
CFIF with a GetListAt(umm..SessionPrivileges,Counter) or something like
that.
I have the code in the office, I'll post the solution I managed tomorrow.
But it works like a charm
Instead of:
Try something like this:
(Not sure on the exact syntax. This is direct from the CFML 4.0 language
reference, and they don't use any ##'s or ""'s (i.e.
#listcontains(session.privileges, deptid)# is not "0"), which I think you
might need. But, I'm blindly trusting the book here.
A
Lee Fuller
Chief Technical Officer
PrimeDNA Corporation
> -Original Message-
> From: Angél Stewart [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 13, 2000 9:39 AM
> To: [EMAIL PROTECTED]
> Subject: Variable IN a list? How to check?
>
>
> How would i writ
any privileges.
-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 13, 2000 12:39 PM
To: [EMAIL PROTECTED]
Subject: Variable IN a list? How to check?
How would i write this correctly in CFML?
Of course I want to check if the list of v
Chris Evans
[EMAIL PROTECTED]
http://www.fuseware.com
-Original Message-
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 13, 2000 12:39 PM
To: [EMAIL PROTECTED]
Subject: Variable IN a list? How to check?
How would i write this correctly in CFML?
Of course I
How would i write this correctly in CFML?
Of course I want to check if the list of values in DeptID are all included
in the list of values in the session.privileges list of values.
Sooo..
deptid may be "11001, 12000,13000"
and session.privileges may be :
"ViewReports,AddUsers,AddGroups,11001,
14 matches
Mail list logo