ColdFusion: Avoiding Evaluate()

Status
Not open for further replies.
The advice is to avoid using the evaluate function.

I have this:-
<cfset tmp = evaluate("#value1#.records")>
where #value1# is a dynamic variable query name and records is a field in that query.

This works and gets the value of the records field. How do I rewrite it without using Evaluate?

I'm trying along the lines of...
<cfset tmp = "#value1#['records'][1]"> but can't get the correct syntax.

Any help muchly appreciated...
 
Status
Not open for further replies.