Thanks, Ray, for input

1. I may have misinterpreted what you meant by currentRow, but including it
anywhere produced an error: unknown variable. Leaving off helped (as below
in 3)

2. Doing the len(trim as this:
    <cfif len(trim(qHomeNews["banner#b#"]))>
produced an error: Paramenter 1 of function trim must be a basic value.
(same if currentRow added)

3. All worked fine IF I set the query alone, then checked it as:
<CFLoop from="1" to="5" index="b">
     <CFSet qry = qNews["banner#b#"]>
     <cfif len(trim(variables.qry))>
          <CFSet MarqMess = Variables.MarqMess & " " & variables.qry>
etc etc

Not understand why what you had (without currentrow) didn't work, but error
in the trim as noted above.

Here is final code that works--but may still be way to not have to set the
qry string separately.

<cfset MarqMess = "News:  ">
<CFLoop from="1" to="5" index="b">
     <CFSet qry = qNews["banner#b#"]>
     <cfif len(trim(variables.qry))>
          <CFSet MarqMess = Variables.MarqMess & " " & variables.qry>
     </cfif>
</CFLOOP>

----- Original Message -----
From: "Raymond Camden" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, December 12, 2002 10:10 AM
Subject: RE: Not want Evaluate in my loop


> Here ya go...
>
> <cfloop from=1 to=5 index="b">
> <cfif len(trim(qNews["banner#b#"][currentRow]))>
> etc
>
> Basically, you just use bracket notation - but I believe you must also
> specify the correct row number. In this case, I just used currentRow.
> You can try w/o it as well.
>
> =======================================================================
> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
>
> Email    : [EMAIL PROTECTED]
> WWW      : www.camdenfamily.com/morpheus
> Yahoo IM : morpheus
>
> "My ally is the Force, and a powerful ally it is." - Yoda
>
> > -----Original Message-----
> > From: E. Keith Dodd [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 12, 2002 9:05 AM
> > To: CF-Talk
> > Subject: Not want Evaluate in my loop
> >
> >
> > I thought I'd done something like this before, but can't
> > locate similar code.
> >
> > Creating a news marquee that can be made up of from 1-5 text
> > fields contained in a larger query. Possibilities are:
> > qNews.Banner1, qNews.Banner2 ... qNews.Banner5
> >
> > Am able to put them together with:
> >
> > <CFSet MarqMess = "News: ">
> > <CFLoop from="1" to="5" index="b">
> >      <CFSet qry = "qNews.banner" & b>
> >      <cfif len(trim(evaluate(variables.qry)))>
> >           <CFSet MarqMess = Variables.MarqMess & " " &
> > evaluate(variables.qry)>
> >      </cfif>
> > </CFLOOP>
> >
> > Above works, but thought there should be a way to do this not
> > using the evaluate function.
> >
> > Appreciate any direction.
> > Thanks
> >
> > E. Keith Dodd
> > Wings of Eagles Services
> > www.wingserv.com


-
[This E-mail scanned for viruses by declude AntiVirus Software]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to