Re: [web2py] orderby part of a string...

2016-07-10 Thread Richard Vézina
Something inside parenthesis, not sure if it specify the end of the string, in my case the parentheisis is at the end... :) Richard On Fri, Jul 8, 2016 at 5:56 PM, Dave S wrote: > > > On Friday, July 8, 2016 at 12:13:41 PM UTC-7, Richard wrote: >> >> Answer is yes it work just fine... >> >>

Re: [web2py] orderby part of a string...

2016-07-08 Thread Dave S
On Friday, July 8, 2016 at 12:13:41 PM UTC-7, Richard wrote: > > Answer is yes it work just fine... > > db(db.ref_colorimeter_color.filter_parameter.belongs(['delta_a', > 'delta_a_b'])).select(db.ref_colorimeter_color.color, > orderby="substring(color, '\(([^\)]+)\)')") > > But with this : > >

Re: [web2py] orderby part of a string...

2016-07-08 Thread Richard Vézina
Answer is yes it work just fine... db(db.ref_colorimeter_color.filter_parameter.belongs(['delta_a', 'delta_a_b'])).select(db.ref_colorimeter_color.color, orderby="substring(color, '\(([^\)]+)\)')") But with this : db.ref_colorimeter_color.color.regexp('\(([^\)]+)\)') It doesn't seems to work as

[web2py] orderby part of a string...

2016-07-08 Thread Richard
Can we do that : http://stackoverflow.com/questions/8989098/postgres-order-data-by-part-of-string ? Maybe like this ? orderby='substring(tablename.fieldname, ...)' ?? Thanks Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py