1

I am having a heck of a time trying to figure this out. I'm trying to replace this evaluate function.

<cfoutput>
 #evaluate('#qry#.#editVal#')#
</cfoutput>

But I just can't seem to work it out. Both qry and editVal are in the variables scope and when using evaluate it returns a value for instane the value of

#qryVitals.PULSE#

I just can't seem to get the notation right to interpret it. Any help would be greatly appreciated.

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

4

#evaluate('#qry#.#editVal#')# is equivalent to #VARIABLES[qry][editVal]#.

As noted by @Leigh, if VARIABLES[qry] is of type query, you have to specify the row number as well, e.g. #VARIABLES[qry][editVal][1]#.

Alex
  • 7,743
  • 1
  • 18
  • 38
  • 1
    Do not forget the row number. – Leigh Jun 07 '17 at 18:42
  • Excellent! thank you so much :) I am not sure why I couldn't figure that one out. – Steven Pennington Jun 07 '17 at 18:51
  • @StevenPennington: don't forget that if an answer works for you, you can _accept_ it to mark it as done. It is optional but recommended. To do so, click on the tick icon next to the answer you like, so that it turns green. – halfer Jun 13 '17 at 22:24