> ...which gives me multiple rows for publications with more
> than one author.  So Pub 1-Auth1, Pub1-Auth2, Pub2-Auth3,
> Pub3-Auth4 = 4 rows for 3 records. My output uses grouped
> nested cfoutputs for display, essentially like this:

> <cfoutput query="research" group="publication_title"
> maxrows="10">
>  #publication_title#
>    <cfoutput>
>      #author_name#
>    </cfoutput>
> </cfoutput>

> But the maxrows attribute goes by the query record count,
> rather than the count of unique publication_titles. So
> instead of seeing 10 records per page, I may get 6 or 9 or
> 7--the system is counting each author row and thinks it's
> reached 10 before it actually has.

Hi Christy. Unfortunately the maxrows attribute wasn't really designed
to work with grouped outputs like this, so in order to make this work
the way you'd like, you'll have to create your own count of records...
The good news is it's not difficult to do:

<cfset pubrow = 1>

<cfoutput group="publication_title">

  <cfif pubrow lte 10>
    #publication_title#
    <cfoutput>
      #author_name#
    </cfoutput>
  </cfif>

  <cfset pubrow = pubrow +1>
</cfoutput>

hth

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to