dynamic variables


i'm trying dynamically output 1 of 3 fields table storing different languages. table rstaal , 3 fields named rstaal.nl, rstaal.e , rstaal.esp respectively.

when output follows: <cfoutput>#rstaal.esp#</cfoutput> have no problems.

as understand should able output same result in way: <cfoutput>#rstaal["esp"]#</cfoutput>
when do, receive following error:

"complex object types cannot converted simple values.
the expression has requested variable or intermediate expression result simple value, however, result cannot converted simple value. simple values strings, numbers, boolean values, , date/time values. queries, arrays, , com objects examples of complex values.
the cause of error trying use complex value simple one. example, might trying use query variable in &lt;cfif&gt; tag. possible in coldfusion 2.0 creates error in later versions."

ultimately i'd determine field dynamically cookie (where cookie.lang = esp):
<cfoutput>#rstaal[cookie.lang]#</cfoutput>

according adobe documentation should work coldfusion mx7, why doesn't it?


help!

i not sure work database field names... cf variables

did try using #evaluate("rstaal." & cookie.lang)# ? correct syntax, though...


More discussions in Getting Started


adobe

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial