I may be missing a pice of logic, but this may work a little better:
<!--- SECURITY CODE ---->
<CFIF IsDefined('DeptID')>
<CFLOOP List="form.DeptID" INDEX="x">
<cfif NOT ListContains(session.currentprivileges,x)>
<cflocation url="#noclearance#" addtoken="yes">
</CFIF>
</CFLOOP>
</CFIF>
<!--- End SECURITY CODE ---->
-----Original Message-----
From: Angél Stewart [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 14, 2000 7:56 AM
To: [EMAIL PROTECTED]
Subject: Re: My solution:Variable IN a list? How to check?
Ok..here is the solution I came up with
and Morning everybody =)
<!--- SECURITY CODE ---->
<CFIF IsDefined('DeptID')>
<CFLOOP INDEX="x" FROM="1" TO="#ListLen(form.DeptID)#">
<cfif ListContains(session.currentprivileges,ListGetAt(form.DeptID,x),",")
EQ 0>
<cflocation url="#noclearance#" addtoken="yes">
</CFIF>
</CFLOOP>
</CFIF>
<!--- End SECURITY CODE ---->
Is this the most eloquent solution to the problem?
:-)
-Gel
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.