Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

evaluate question

Status
Not open for further replies.

JohnMaas

MIS
Aug 14, 1999
18
US
Hi,
Trying to read default values from a table and use it in the form to populate fields.
CF syntax : <CFSET var1= "ABC">

question is: How can I create this line of code if the var1 is read from a table?
Something like <CFSET evaluate(xx.Def) = #xx.Val)> ??

Thanks
 
<cfset var1=QueryName.VarNameField>

Since the value is the name of a field, neither cf or sql knows that at this point so you can read it as you normally would.

<cfset val1=Evaluate(var1)>

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
amazing... thanks !!
This is what I got out of it and it works..

<CFSET ctext = 'cVar="ABC"'>
<CFSET cX = #evaluate(cText)#>
<CFOUTPUT>#cVar#</CFOUTPUT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top