Definitely sounds odd. Can you upload a minimal app that reproduces the problem?
On Thursday, July 16, 2015 at 5:47:52 PM UTC-4, icodk wrote: > > I want to represent a field with a link to a function in an > SQLFORM.smartgrid with reference to the row: > db.place.mode.represent=lambda mode,row: A(mode,_href=URL( > 'place_mode_change',args=[row.id],user_signature=True)) > > In the above expression the link A is constructed from the mode which is > the value of the mode of the current row.mode to be displayed and the args > in the URL should be the current row.id > This works fine as long as the mode value is different from one row to > another. However, if the value of mode in two different rows are the same > then the row.id is the same and it is set to the first occurrence of the > mode value. > For example if we have 3 rows and the values of the mode field > are:'Normal' in row 1 ,'High' in row 2 and again 'Normal' in row 3 then > the args=row.id will be set to: 1 on the first row. 2 in the second row > and 1 again in the third row instead of 3 because the row id is actually 3 > and not 1. > Any idea about what is happening and what am I doing wrong ? > > -- 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.

