No No No....that's not what I said ;-)

OK....the stepped approach ;-)

assumptions:
-MyField is the anme of the field that conatins the CF vars
-MyVar is the name of one of the CF vars contained in MyField

1) retrieve data

2) output the query

3) while outputting the query you:
-EVALUATE the value of MyVar  <cfset MyVarValue = Evaluate("MyVar")>
-REPLACE the string #MyVar# (in MyField) with it's value <cfset MyNewField = 
ReplaceNoCase(MyField,"#MyVar#",MyVarValue,"ALL")>
-use MyNewField as your output instead of the raw MyField

All you did was replace a string with another string (even though it looked 
like a var).  You have to replace the string with the evaluated value of the 
variable.

<cfoutput query="MyQuery">
  <cfset MyVarValue = Evaluate("MyVar")>
  <cfset MyNewField = ReplaceNoCase(MyField,"#MyVar#",MyVarValue,"ALL")>
  #MyNewField #
</cfoutput>

Hope that clears it up ;-)

Cheers

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com
----- Original Message ----- 
From: "Stewart, Ryan" <[EMAIL PROTECTED]>
To: "CF-Talk" <cf-talk@houseoffusion.com>
Sent: Monday, June 13, 2005 1:03 PM
Subject: RE: Using CF Variables Returned from a SQL Query


> It still isn't working.  I've tried a couple of things.  Before, my
> query statement was written as:
>
> <cfoutput query="myQuery">
> #big_text#
> </cfoutput>
>
> So I went through and made the changes you suggested, and my text
> outputted to the screen as:
>
> Some text here, some more text, a Evaluate("ColdFusion_Variable") here,
> some more text, even more text.
>
> So then I tried changing my cfoutput statement to this:
>
> <cfoutput query="myQuery">
> #Evaluate("big_text")#
> </cfoutput>
>
> But still no change.  I also tried replacing the
> Evaluate("ColdFusion_Variable") with #Evaluate("ColdFusion_Variable")#
> but got the same thing.
>
> Thanks for taking a stab at it, any more ideas?
>
> -Ryan
>
> -----Original Message-----
> From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 13, 2005 2:04 PM
> To: CF-Talk
> Subject: Re: Using CF Variables Returned from a SQL Query
>
> You'll need to parse out and replace every CF variable in the text (i.e.
>
> find this string "#ColdFusion_Variable#" and replace it with
> Evaluate("ColdFusion_Variable") )
>
> Hope that helps.....have fun ;-)
>
> Cheers
>
> ----- Original Message ----- 
> From: "Stewart, Ryan" <[EMAIL PROTECTED]>
> To: "CF-Talk" <cf-talk@houseoffusion.com>
> Sent: Monday, June 13, 2005 10:59 AM
> Subject: Using CF Variables Returned from a SQL Query
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209339
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to