Checking SESSION variable
Hi, I have session variable that contains the directory name "session.strFileName". I also have another session variable "session.ShowMe" that contains multiple directory names (comma-delimited) which i'm setting from my database. Basically, i need to check if the directory "session.strFileName" exists in the variable "session.showme". Example: session.strfilename = 'mywork' session.showme = 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
Re: Checking SESSION variable
I think this is what you are asking. sesion.strFileName = D:\Temp sesion.ShowMe = D:\Temp,D:\Test then the above CFIF statement should return TRUE >>> [EMAIL PROTECTED] 12/02/02 11:08AM >>> Hi, I have session variable that contains the directory name "session.strFileName". I also have another session variable "session.ShowMe" that contains multiple directory names (comma-delimited) which i'm setting from my database. Basically, i need to check if the directory "session.strFileName" exists in the variable "session.showme". Example: session.strfilename = 'mywork' session.showme = 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: Checking SESSION variable
do this do that HTH Clint - Original Message - From: "FlashGuy" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, December 02, 2002 10:08 AM Subject: Checking SESSION variable > Hi, > > I have session variable that contains the directory name "session.strFileName". I also have another session variable "session.ShowMe" that contains multiple directory names > (comma-delimited) which i'm setting from my database. Basically, i need to check if the directory "session.strFileName" exists in the variable "session.showme". > > Example: > > session.strfilename = 'mywork' > > session.showme = 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' > > > > --- > Colonel Nathan R. Jessop > Commanding Officer > Marine Ground Forces > Guatanamo Bay, Cuba > --- > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
RE: Checking SESSION variable
Use the find function . but from the example that could be ambigious, as there could be more than one mywork2 in different sub folders. Jason Lees Systems Developer National Express Coaches Ltd. -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED]] Sent: 02 December 2002 16:08 To: CF-Talk Subject: Checking SESSION variable Hi, I have session variable that contains the directory name "session.strFileName". I also have another session variable "session.ShowMe" that contains multiple directory names (comma-delimited) which i'm setting from my database. Basically, i need to check if the directory "session.strFileName" exists in the variable "session.showme". Example: session.strfilename = 'mywork' session.showme = 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
RE: Checking SESSION variable
listcontainsNoCase Description Returns the index of the first element of a list that contains a specified substring within elements. The search is case-insensitive. If no element is found, returns 0. Category List functions Syntax listcontainsNoCase(list, substring [, delimiters ]) ..tony Tony Weeg Senior Web Developer Information System Design Navtrak, Inc. Fleet Management Solutions www.navtrak.net 410.548.2337 -Original Message- From: FlashGuy [mailto:[EMAIL PROTECTED]] Sent: Monday, December 02, 2002 11:08 AM To: CF-Talk Subject: Checking SESSION variable Hi, I have session variable that contains the directory name "session.strFileName". I also have another session variable "session.ShowMe" that contains multiple directory names (comma-delimited) which i'm setting from my database. Basically, i need to check if the directory "session.strFileName" exists in the variable "session.showme". Example: session.strfilename = 'mywork' session.showme = 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: Checking SESSION variable
>I have session variable that contains the directory > name "session.strFileName". I also have another session > variable "session.ShowMe" that contains multiple directory > names (comma-delimited) which i'm setting from my database. > Basically, i need to check if the > directory "session.strFileName" exists in the > variable "session.showme". > >Example: > >session.strfilename = 'mywork' > >session.showme = 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' If you always know that it's going to be "c:\temp\" and then whatever session.strfilename is, you can just do this: Here is is! Not found Scott Brady http://www.scottbrady.net/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Re: Checking SESSION variable
Actually, the session.strFileName would have no path in it. sesion.strFileName = Temp sesion.ShowMe = D:\Temp,D:\Test On Mon, 02 Dec 2002 11:11:43 -0500, Randell B Adkins wrote: > > > I think this is what you are asking. > sesion.strFileName = D:\Temp > sesion.ShowMe = D:\Temp,D:\Test > > then the above CFIF statement should return TRUE > > > >>> [EMAIL PROTECTED] 12/02/02 11:08AM >>> > Hi, > > I have session variable that contains the directory name > "session.strFileName". I also have another session variable > "session.ShowMe" that contains multiple directory names > (comma-delimited) which i'm setting from my database. Basically, i need > to check if the directory "session.strFileName" exists in the variable > "session.showme". > > Example: > > session.strfilename = 'mywork' > > session.showme = > 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' > > > > --- > Colonel Nathan R. Jessop > Commanding Officer > Marine Ground Forces > Guatanamo Bay, Cuba > --- > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
Re: Checking SESSION variable
Then try: This will just look for an instance of session.strFileName within the session.ShowMe variable. >>> [EMAIL PROTECTED] 12/02/02 11:24AM >>> Actually, the session.strFileName would have no path in it. sesion.strFileName = Temp sesion.ShowMe = D:\Temp,D:\Test On Mon, 02 Dec 2002 11:11:43 -0500, Randell B Adkins wrote: > > > I think this is what you are asking. > sesion.strFileName = D:\Temp > sesion.ShowMe = D:\Temp,D:\Test > > then the above CFIF statement should return TRUE > > > >>> [EMAIL PROTECTED] 12/02/02 11:08AM >>> > Hi, > > I have session variable that contains the directory name > "session.strFileName". I also have another session variable > "session.ShowMe" that contains multiple directory names > (comma-delimited) which i'm setting from my database. Basically, i need > to check if the directory "session.strFileName" exists in the variable > "session.showme". > > Example: > > session.strfilename = 'mywork' > > session.showme = > 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' > > > > --- > Colonel Nathan R. Jessop > Commanding Officer > Marine Ground Forces > Guatanamo Bay, Cuba > --- > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: Checking SESSION variable
FlashGuy wrote: > Hi, > > I have session variable that contains the directory name > "session.strFileName". I also have another session variable > "session.ShowMe" that contains multiple directory names > (comma-delimited) which i'm setting from my database. Basically, i > need to check if the directory "session.strFileName" exists in the > variable "session.showme". > > Example: > > session.strfilename = 'mywork' > > session.showme = > 'c:\temp\dir1,c:\temp\dir2,c:\temp\mywork,c:\temp\mywork2' use a struct, it's more reliable & faster than a comma delimetered lists z ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com