I cannot reproduce the problem. When I try the same, the in new_function, the value of request.vars.id is a list of record IDs (from those selected in the grid).
Also, note that when you use groupby, it will collapse over multiple records that share the same value on field1, so you will only see the ID of one of the (potentially many) records that match a particular value of field1. This will make whatever you are doing with those IDs somewhat arbitrary. On Thursday, February 4, 2016 at 8:15:51 AM UTC-5, [email protected] wrote: > > Hi Guys, > > I use below controller function: > > > > def my_grid(): > > > > > query = (db.table.id > 0) > fields=(db.table.id,db.table.field1) > selectable=[('Send IDs to another function', lambda ids: redirect(URL( > 'default','new_function',vars=dict(ids=ids))))] > > grid = SQLFORM.grid(query=query,fields=fields,selectable=selectable, > groupby=db.table.field1) > > > return dict(grid=grid) > > > def new_function(): > return dict() > > > view for new_function is: > {{=request.vars.ids}} > > > > > > Unfortunately because of i used groupby in grid, i don't send IDs to > new_function but values of field1. Is there any way to groupby by field1 > but pass IDs inside request? > Also every time I click "Send IDs to another function" button, i do > new_function and go back to my_grid function, but the checkboxes I marked > at the beginning are not ticked any more. How to make sure that i do > new_function and go back to my_grid and see ticked checkboxes? > > Regards > > -- 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]. For more options, visit https://groups.google.com/d/optout.

