|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Checking SESSION variable
Author: Zac Spitzer
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98496
FlashGuy wrote:
----- Excess quoted text cut - see Original Post for more -----
use a struct, it's more reliable & faster than a comma delimetered lists
z
Author: Randell B Adkins
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98254
Then try:
<CFIF FINDNOCASE(session.strFileName,session.ShowMe,1) GT 0>
This will just look for an instance of session.strFileName within
the session.ShowMe variable.
>>> flashmx@rogers.com 12/02/02 11:24AM >>>
Actually, the session.strFileName would have no path in it.
sesion.strFileName = Temp
sesion.ShowMe = D:\Temp,D:\Test
----- Excess quoted text cut - see Original Post for more -----
need
> to check if the directory "session.strFileName" exists in the
variable
----- Excess quoted text cut - see Original Post for more -----
Author: FlashGuy
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98252
Actually, the session.strFileName would have no path in it.
sesion.strFileName = Temp
sesion.ShowMe = D:\Temp,D:\Test
----- Excess quoted text cut - see Original Post for more -----
Author: Scott Brady
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98250
----- Excess quoted text cut - see Original Post for more -----
If you always know that it's going to be "c:\temp\" and then whatever
session.strfilename is, you can just do this:
<cfif ListFindNoCase(session.showme,"c:\temp\" & session.strfilename,",")>
Here is is!
<cfelse>
Not found
</cfif>
--------------------------------
Scott Brady
http://www.scottbrady.net/
Author: Tony Weeg
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98249
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
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
---------------------------------------------------
Author: Jason Lees (National Express)
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98248
Use the find function
<cfif find(session.showme,session.strfilename,0) gte 0>
....
<cfelse>
.....
</cfif>
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.
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
---------------------------------------------------
Author: Clint Tredway
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98247
<cfif findNoCase(session.strFileName,session.ShowMe)>
do this
<cfelse>
do that
</cfif>
HTH
Clint
> 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'
----- Excess quoted text cut - see Original Post for more -----
Author: Randell B Adkins
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98246
<CFIF LISTCONTAINSNOCASE(session.ShowMe,session.strFileName)>
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
>>> flashmx@rogers.com 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
---------------------------------------------------
Author: FlashGuy
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:19408#98245
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
---------------------------------------------------
|
May 25, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||