My bad. Try this:

 count = db.auth_user.id.count()
 # bad hack
 count._tablename = 'auth_user'
 count.readable = True
 count.represent = None
 count.formatter = lambda value:value
 # end bad hack
 results= SQLFORM.grid(db.org, 
                          fields=[db.org.name, db.org.jurisdiction, 
db.org.otype, db.org.id, count], 
                          left=db.org.on(db.auth_user.org_ref==db.org.id),
                          deletable=False, details=True, create=False, 
editable=False, 
                          orderby=db.org.name.upper(), groupby=db.org.id,
                          maxtextlength=50, paginate=20, csv=False, 
searchable=False)
    return dict(results=results)

On Saturday, 21 July 2012 12:10:45 UTC-5, david.waldrop wrote:
>
> Massimo, thanks,  this made progress in that it now does't emit and error, 
> but only shows one row (instead of the 18 records in the table) and the a 
> count for the single row of 39 (which is the total # users in the system). 
> What I need is 18 rows, one for each org, and the # of users for each org 
> (typically between 1-10) with current data.
> How does the grid know when to reset count???
>

-- 



Reply via email to