Re: StructAppend Creating an Error

2010-10-30 Thread Monique Boea
I can output the value of the session vars like so: cfloop query=memberInfoFields cfoutput#session.memberRegister[STRFIELDNAME]#br/cfoutput but this is not working correctly: cfloop query=memberInfoFields input type=text name=#STRFIELDNAME# value=#session.memberRegister[STRFIELDNAME]# size=30

Re: StructAppend Creating an Error

2010-10-30 Thread Leigh
Is it possible the value of those keys is actually blank? In previous code you were setting the default value to . Output the value before the inputs. What do you see? cfoutput cfloop query=memberInfoFields Debug value of #STRFIELDNAME# = #session.memberRegister[STRFIELDNAME]# input

Re: StructAppend Creating an Error

2010-10-30 Thread Monique Boea
I get the results when I user your code Debug value of strInstUsername = Debug value of strLanguage = Debug value of strInstEmail = m...@aol.com Debug value of strGender = Female Debug value of strDegrees = Associate Degree Debug value of strEmployeeNum = Debug value of strDepartment = Debug

Re: StructAppend Creating an Error

2010-10-30 Thread Monique Boea
I figured it out: I had code that was resetting the values: cfif NOT isDefined(session.memberRegister.STRFIELDNAME) cfset session.memberRegister.#STRFIELDNAME# = /cfif On Sat, Oct 30, 2010 at 3:24 PM, Monique Boea moniqueb...@gmail.com wrote: I get the results when I user your

Re: StructAppend Creating an Error

2010-10-30 Thread Leigh
cfset session.memberRegister.#STRFIELDNAME# = Good job. BTW: Consider using associative array notation, it is easier on the eyes ;-) ~| Order the Adobe Coldfusion Anthology now!

StructAppend Creating an Error

2010-10-29 Thread Monique Boea
Hello I have a multi step form that is being submitted to itself. I create a structure session.memberRegister and then append to the structure as each form is submitted like so: cfscript session.memberRegister = structnew(); /cfscript cfset

Re: StructAppend Creating an Error

2010-10-29 Thread Monique Boea
I got this to work. DUH!! cfloop query=memberInfoFields !--- create dynamic session vars --- cfif NOT isDefined(session.memberRegister.STRFIELDNAME) cfset session.memberRegister.#STRFIELDNAME# = /cfif On Fri, Oct 29, 2010 at 9:38 AM, Monique Boea moniqueb...@gmail.com wrote: Hello I

Re: StructAppend Creating an Error

2010-10-29 Thread Leigh
cfset StructAppend(session['memberRegister'],STRFIELDNAME) StructAppend, appends the contents of one structure onto another. STRFIELDNAME looks like a simple value. If you are trying to create a dynamic key, just use array notation ie cfset session.memberRegister[STRFIELDNAME] =

Re: StructAppend Creating an Error

2010-10-29 Thread Monique Boea
Thanks Leigh. Now, how do I check for the existance of and use these dynamic variables to set my form values? Like so: cfif #session.memberRegister.strCME# EQ medicalselected=selected/cfif But I need to use dynamic variable names. I am trying to use this but it is not working:

Re: StructAppend Creating an Error

2010-10-29 Thread Leigh
Now, how do I check for the existance of and use these dynamic variables to set my form values? The same way as before. Use array notation. No need for the extra # signs. ie cfif session.memberRegister[ STRFIELDNAME ] eq someValue something here... /cfif BTW: Most scopes in CF are

Re: StructAppend Creating an Error

2010-10-29 Thread Leigh
Now, how do I check for the existance value=#Evaluate(session.memberRegister.#STRFIELDNAME#)# BTW: I ignored the check for existence comment because your code seemed to be getting the value instead. But if you really do mean existence, then use structKeyExists or IsDefined.