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 <[email protected]> wrote:
> 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 StructAppend(session['memberRegister'],form)>
>
> On one of the steps, I retrieve data and create dynamic form fields which I
> need to append to the session structure.
>
> I added a loop and I am appending the query results to the structure like
> so:
>
> <cfloop query="memberInfoFields">
>
> <!--- create dynamic session vars --->
> <cfset StructAppend(session['memberRegister'],STRFIELDNAME)>
>
>
>
> The session vars are created but I get the following error:
>
> You have attempted to dereference a scalar variable of type class
> java.lang.String as a structure with members.
>
> 42 :
> 43 : <!--- create dynamic session vars --->*44 : <cfset
> StructAppend(session['memberRegister'],STRFIELDNAME)*
>
>
>
> Any suggestions?
>
> Thank you!
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338672
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm