r34220 wrote:
> I need some help with setting dynamic session variables.
I use the following
> code:
> <cfset VARIABLES[ "session."& res.system &
"_Status" ] = "Unknown" /> where
> res.system = mysystem
> If I output say #session.mysystem_Status# I get the
correct value of the
> variable if I try to use <cfdump var="session">
the session variable is not
> included in output of the cfdump. And I cant uses it in
any other functions
> except for cfouput. If I try
> <cfif evaluate("session.#monitors
[1]#_Status") eq "Unknown"> Unknown</cfif>
> where monitors[1] is "mysystem" I get a error that
says the session variable
> is undefined.
>
> Please help :)
>
of course it is not defined because with <cfset VARIABLES[
"session."&
res.system & "_Status" ] = "Unknown" /> you are
setting a local
VARIABLES scope var named "session.mysystem_Status", not a
SESSION scope
variable.
--
Azadi Saryev
Sabai-dee.com
Vientiane, Laos
http://www.sabai-dee.com