To get a string to run as code, you have to use Evaluate(), and usually with an extra DE() thrown in for good measure:
try this: <cfoutput>#numberFormat(evaluate(de(result2)))#</cfoutput> ---------------------------------------- From: "Keith McGee" <[email protected]> Sent: Thursday, April 14, 2011 10:43 AM To: "cf-talk" <[email protected]> Subject: display dynamic algorithm I am writing a program to formulate results based on other results entered. if I create the algorithm dynamically I get the value can't be converted to a number error <cfset result2= '#get_result1.fld_test_result##fld_formula1##get_result2.fld_test_result##fl d_formula2#'> <cfoutput>#numberFormat(result2)#</cfoutput> The value 481*(100.08747/40.0784)+44.8*(100.08747/24.30506) cannot be converted to a number. but if I enter the value #numberFormat(481*(100.08747/40.0784)+44.8*(100.08747/24.30506))# it works fine. What am I forgetting to do? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343713 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

