Can you try with the field in the format:

db.tablename.fieldname

ex:

fields = [db.engagement.id, db.engagement.name]

-Jim


On Monday, January 25, 2021 at 11:45:49 PM UTC-6 at wrote:

> Here is the code:
> `fields=['id', 'name']`
> `grid = SQLFORM.grid(db.engagement, fields=fields)`
>
> Error:
> `AttributeError('str' object has no attribute 'tablename')`
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/e19daf19-95c7-4e46-88da-74882bd4e51an%40googlegroups.com.

Reply via email to