APS NZ
asked on
Lost among the #s
I have a function for generating a spreadsheet and it works fine. I use the following code to call it
<CFOUTPUT>
<CFSET K=GenerateSpreadsheet("Fre ddi","#Get Names#")>
#K#
</CFOUTPUT>
How do I rewrite it as
<CFOUTPUT>
#GenerateSpreadsheet("Fred di","#GetN ames#")#>
</CFOUTPUT>
without the hashes around GetNames causing a problem?
<CFOUTPUT>
<CFSET K=GenerateSpreadsheet("Fre
#K#
</CFOUTPUT>
How do I rewrite it as
<CFOUTPUT>
#GenerateSpreadsheet("Fred
</CFOUTPUT>
without the hashes around GetNames causing a problem?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> I had thought I needed the hashes around the query name
Only because you put quotes around the variable name. When you do that, CF doesn't know GetNames is a variable. It won't evaluate it unless you put # signs around it. So if you skip the quotes, you don't need the # signs.
Only because you put quotes around the variable name. When you do that, CF doesn't know GetNames is a variable. It won't evaluate it unless you put # signs around it. So if you skip the quotes, you don't need the # signs.
ASKER
Thanks for the explanation agx - It makes more sense when you understand the reasons ;-)
Yep. The real problem was the trailing ">", but I figured an explanation of the # sign stuff wouldn't hurt either :).
ASKER