Yes.. since u are using arrays and structs in the session .. u should be
safe..
i didnt know what u were doing from the previous 2 code posts u made.
Looks like none of us get any sleep!...Good luck.

Joe

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 12:21 AM
To: CF-Talk
Subject: RE: oddity with variables and cfset


joe.....

this is the full snippet, i think i am doing
the right thing, i set the session var FinalReturnResults
first, to get an array in the session scope, this array
becomes and array of structures shortly after that....


<cfset session.FinalReturnResults=ArrayNew(1)>

<cfloop from="1" to="#arrayLen(session.FullReturn)#" index="i">

<cfset Value = ArrayAppend(session.FinalReturnResults,
#form["account_id_#session.FullReturn[i].id#"]#)>

        </cfloop>

        <cfloop from="1" to="#arrayLen(session.FinalReturnResults)#"
index="i">

        <cfparam name="form.status_amount_#session.FullReturn[i].id#"
default="0">
        <cfparam name="form.ri_status_amount_#session.FullReturn[i].id#"
default="0">
        <cfparam name="form.amount_#session.FullReturn[i].id#"
default="0">
        <cfparam name="form.account_id_#session.FullReturn[i].id#"
default="0">
        <cfparam name="form.account2_id_#session.FullReturn[i].id#"
default="0">
        <cfparam name="form.amount_type_#session.FullReturn[i].id#"
default="0">

        <cfset returnResults=structNew()>

        <cfif #form["action_id_#session.FullReturn[i].id#"]#>

        <cfset returnResults.action_id =
#form["action_id_#session.FullReturn[i].id#"]#>
        <cfset returnResults.account_id =
#form["account_id_#session.FullReturn[i].id#"]#>
        <cfset returnResults.account2_id =
#form["account2_id_#session.FullReturn[i].id#"]#>
        <cfif #form["accountft_type_#session.FullReturn[i].id#"]#>
                <cfset returnResults.account_type =
#form["accountft_type_#session.FullReturn[i].id#"]#>
        <cfelseif #form["accountat_type_#session.FullReturn[i].id#"]#>
                <cfset returnResults.account_type =
#form["accountat_type_#session.FullReturn[i].id#"]#>
        <cfelse>
                <cfset returnResults.account_type = 0>
        </cfif>
        <cfset returnResults.amount =
#form["amount_#session.FullReturn[i].id#"]#>
        <cfset returnResults.amount_type =
#form["amount_type_#session.FullReturn[i].id#"]#>
        <cfset returnResults.add_inquiry =
#form["add_inquiry_#session.FullReturn[i].id#"]#>
        <cfset returnResults.status_amount =
#form["status_amount_#session.FullReturn[i].id#"]#>
        <cfset returnResults.ri_status_amount =
#form["ri_status_amount_#session.FullReturn[i].id#"]#>
        <cfset session.FinalReturnResults[i] = returnResults>


        <cfelse>

        <cfset returnResults.action_id = " ">
        <cfset returnResults.account_id = " ">
        <cfset returnResults.account2_id = " ">
        <cfset returnResults.account_type = " ">
        <cfset returnResults.amount = " ">
        <cfset returnResults.amount_type = " ">
        <cfset returnResults.add_inquiry = " ">
        <cfset returnResults.status_amount = " ">
        <cfset returnResults.ri_status_amount = " ">
        <cfset session.FinalReturnResults[i] = returnResults>


        </cfif>

        </cfloop>

does this make sense? or am i headed down your same path?

tony


-----Original Message-----
From: Joe Eugene [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 12:11 AM
To: CF-Talk
Subject: RE: oddity with variables and cfset


Tony,
        I think i mentioned this earlier....
        1. Your sessions dont look like they are locked.
        2. when you run into a case of destroying the session variable..
        u will  NOT have any easy way of doing this.. since no structs
implemented
        in the session...

        I did the same thing a long time ago and had to re-write the
code...u know
        one of those times..
        Example... for just passing form stuff..(frm Struct)
        <cfscript>
        session.sfrm=structNew();
        session.sfrm.val1=1;
        session.sfrm.val1=2;
        // u can also copy the form structure to a session variable..
        // session.frmvalues=duplicate(form);
        </cfscript>
        so when u are done with passing form values you could delete all
that
session form
        vals from memory with one line of code.
        <cfscript>
        structDelete(session,"sfrm"); //destroying the structure(sfrm)
in the
session scope
        </cfscript>

Joe
-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 11:20 PM
To: CF-Talk
Subject: RE: oddity with variables and cfset


yup, thats what i just came up with too :)
just writing the never mind message!!

thanks anyway...

tony

        <cfif #form["accountft_type_#session.FullReturn[i].id#"]#>
                <cfset returnResults.account_type =
#form["accountft_type_#session.FullReturn[i].id#"]#>
        <cfelseif #form["accountat_type_#session.FullReturn[i].id#"]#>
                <cfset returnResults.account_type =
#form["accountat_type_#session.FullReturn[i].id#"]#>
        <cfelse>
                <cfset returnResults.account_type = 0>
        </cfif>

-----Original Message-----
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 09, 2002 11:16 PM
To: CF-Talk
Subject: RE: oddity with variables and cfset


You can't use cf tags in an expression. You could use Iif(). But most
people would simply write

<cfif form["accountft_type_#session.FullReturn[i].id#"]>
        <cfset returnResults.account_type =
form["accountft_type_#session.FullReturn[i].id#"]>
<cfelseif form["accountat_type_#session.FullReturn[i].id#"]>
        <cfset returnResults.account_type =
form["accountat_type_#session.FullReturn[i].id#"]>
</cfif>


> -----Original Message-----
> From: Tony Weeg [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 10 September 2002 3:08 p.m.
> To: CF-Talk
> Subject: oddity with variables and cfset
>
>
> i know this value is a number 0-9
> and for the life of me i cannot figger
> out why in the heck this won't work?
>
> HELP :)
>
> <cfset returnResults.account_type =
>
>       <cfif #form["accountft_type_#session.FullReturn[i].id#"]#>
>               #form["accountft_type_#session.FullReturn[i].id#"]#
>       <cfelseif #form["accountat_type_#session.FullReturn[i].id#"]#>
>               #form["accountat_type_#session.FullReturn[i].id#"]#
>       </cfif>
>
> >
>
> ...tony
>
> tony weeg
> [EMAIL PROTECTED]
> www.revolutionwebdesign.com
> rEvOlUtIoN wEb DeSiGn
> 410.334.6331
>
>




______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to