Copy link to clipboard
Copied
I'm trying to do the following:
The query works and cfdumps 2 items as expected. valuearray fails as part of cfset set and I've tried various and sundry combinations of quotes and such with no luck. Can someone help me sort this out? The end goal is to have an array I can do an arrayFind against to see if someone gets to see a particular web app or not.
Tanks,
JimB
The syntax for CFSET is
<cfset var = expression>
where the expression is any valid CF expression. If it's a literal value, it would be wrapped in double quotes, like this:
<cfset first_name = "Bob">
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
The syntax for CFSET is
<cfset var = expression>
where the expression is any valid CF expression. If it's a literal value, it would be wrapped in double quotes, like this:
<cfset first_name = "Bob">
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Thanks Dave!
I must have been severely under-caffeinated to try and make up <cfset>var=val</cfset>
Now, I just have to figure out the cf 11 equivalent of ValueArray 😞
Thanks for the help,
JimB
Copy link to clipboard
Copied
In CF 11, I think you have to iterate through the query to build an array. Search for "query array ColdFusion" and you should find some simple custom functions for that.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
`<cfset applist="ListToArray(" arraytolist(="" appqry[="" "app"="" ],"|"="" ),"|",true="" )="">`
vs
`<cfset applist="ValueArray(appqry,"app")">'
Works! Hope this helps someone else! Thanks again Dave!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more