-Original Message-
From: Ali Daniali [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 1:48 PM
To: CF-Talk
Subject: dynamically created session variables
I'm trying to load form variables into session variables in an
application...but I'm having problems with the creating
Try this:
CFSET Session.#FieldName# = Evaluate(FieldName)
-Original Message-
From: Ali Daniali [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 1:48 PM
To: CF-Talk
Subject: dynamically created session variables
I'm trying to load form variables into session variables in
IIRC, you need to do
cfset session[#fieldname#] = evaluate(fieldname)
-- Ben Doom
Programmer General Lackey
Moonbow Software, Inc
: -Original Message-
: From: Ali Daniali [mailto:[EMAIL PROTECTED]
: Sent: Monday, March 03, 2003 1:48 PM
: To: CF-Talk
: Subject: dynamically
Kill that evaluate() too:
cfset session[fieldname] = form[fieldname] /
-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 11:03 AM
To: CF-Talk
Subject: RE: dynamically created session variables
IIRC, you need to do
cfset session[#fieldname
Subject: RE: dynamically created session variables
IIRC, you need to do
cfset session[#fieldname#] = evaluate(fieldname)
-- Ben Doom
Programmer General Lackey
Moonbow Software, Inc
: -Original Message-
: From: Ali Daniali [mailto:[EMAIL PROTECTED]
: Sent: Monday
, 2003 11:18 AM
To: CF-Talk
Subject: RE: dynamically created session variables
Or even better:
cfset session[fieldname] = form[fieldname]
No need for evaluate, or all those #s and s.
You can also do:
cfset structAppend(session,form
So with this option I drop the CFLOOP all together, correct?
Thank you all for your help!
-AD
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 11:18 AM
To: CF-Talk
Subject: RE: dynamically created session variables
Or even better:
cfset
PROTECTED]
Sent: Monday, March 03, 2003 1:22 PM
To: CF-Talk
Subject: RE: dynamically created session variables
Make sure you add a third parameter to structAppend() for
whether or not you want to overwrite values. And note that
it'll add EVERYTHING in the FORM scope, which may or may
: Monday, March 03, 2003 1:38 PM
To: CF-Talk
Subject: RE: dynamically created session variables
So with this option I drop the CFLOOP all together, correct?
Thank you all for your help!
-AD
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Monday, March
CFSET Session.#FieldName# = #Evaluate(FieldName)#
You have a few choices
1. cfset session['#myFieldName#'] = form.someField
2. structAppend(session, form); // simple struct copy
3. session.frmStruct = duplicate(form); // deep copy
Hope this helps.
Joe Eugene
-Original Message-
10 matches
Mail list logo