Skip to main content
Known Participant
January 8, 2008
Answered

How do I do this?

  • January 8, 2008
  • 2 replies
  • 357 views
<cfset #evaluate("session.partnumber#x#")#=0>

You can see what I am trying to do, however this will not work
nor
<cfset evaluate("session.partnumber#x#")=0>
nor
<cfset session.partnumber#x#=0>

Any insight would be helpful. Thanks.
This topic has been closed for replies.
Correct answer Newsgroup_User
SilentBob'secretfusion wrote:
> <cfset #evaluate("session.partnumber#x#")#=0>

Must be the day of the array notation. Third time today this has come up.

<cfset session['partnumber' & x] = 0>
<!--- Look Ma! No Evaluate()! --->

Array notation, learn it love it, it applies to almost every variable
type in ColdFusion.

2 replies

Inspiring
January 8, 2008
Newsgroup_UserCorrect answer
Inspiring
January 8, 2008
SilentBob'secretfusion wrote:
> <cfset #evaluate("session.partnumber#x#")#=0>

Must be the day of the array notation. Third time today this has come up.

<cfset session['partnumber' & x] = 0>
<!--- Look Ma! No Evaluate()! --->

Array notation, learn it love it, it applies to almost every variable
type in ColdFusion.
Known Participant
January 9, 2008
Ian you dah man! Thanks. :)