Skip to main content
Inspiring
March 9, 2007
Question

cfchartseries colorlist variable

  • March 9, 2007
  • 1 reply
  • 535 views
when I user the colorlist="hexadecimal value, ..." it works great.

When I create a variable for the colorlist value it is coded like colorlist="#mycolor1#"

This works. However, I have 3 different color lists and I want to dynamically decide which mycolor# to use by a URL variable that is passed to the page. I used a simple if statement:

colorlist=
<cfif deptnmIS "finance">
"#mycolor3#"
</cfif>>

and got this error:

Invalid token '"' found on line 291 at column 39.

The CFML compiler was processing:

* the tag attribute "IS", on line 291, column 36.
* a cfchartseries tag beginning on line 289, column 10.

Any ideas hot to fix this?
This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
March 10, 2007
surely a typo: deptnmIS

Perhaps this?

<cfset colorlist="#mycolor1#">
<cfif deptnm IS "finance">
<cfset colorlist="#mycolor3#">
</cfif>