-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Like Aaron and Peter said, SCOPE your variables like so:

<cfoutput query="FAQ">
<cfset VARIABLES.UserCount = Users.Recordcount>
<cfset VARIABLES.Question = Replace(FAQ.Question, '$$UserCount$$',
VARIABLES.usercount, "ALL")>
<cfset VARIABLES.Answer = Replace(FAQ.Question, '$$UserCount$$',
VARIABLES.usercount, "ALL")>

        <a name="#FAQ.FAQID#"></a>
        <div class="FAQQuestion">
                #VARIABLES.Question#
        </div>
        <P>
        <div class="FAQAnswer">
                #VARIABLES.Answer#
        </div>
        <HR>
</cfoutput>

When you are referencing #Question# you are actually referencing
#FAQ.Question# and not #VARIABLES.Question#, so it wont work

Phillip M. Vector wrote:
> Here's the full code.
> 
> <cfoutput query="FAQ">
> <cfset UserCount = Users.Recordcount>
> <cfset Question = Replace(FAQ.Question, '$$UserCount$$', usercount, "ALL")>
> <cfset Answer = Replace(FAQ.Question, '$$UserCount$$', usercount, "ALL")>
> 
>       <a name="#FAQ.FAQID#"></a>
>       <div class="FAQQuestion">
>               #Question#
>       </div>
>       <P>
>       <div class="FAQAnswer">
>               #Answer#
>       </div>
>       <HR>
> </cfoutput>
> 
> So yeah. it's looping fine. Just doesn't show any usercount.
> 
> Aaron Rouse wrote:
>> Is it inside a loop over a query?  If so then scope your outputed variables
>> in those div elements.  
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313751
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to