[web2py] Re: form grid Order by a Field Value in the Parent Table

2017-09-17 Thread rafi farchi
On Tuesday, September 12, 2017 at 12:12:53 PM UTC+3, tim.n...@conted.ox.ac.uk wrote: > > Your grid should be using a query that brings in both tables, rather than > just the Voyages table: > def Voyages(): > Voyages = SQLFORM.grid(db.EQ_Voyages.Vessel == db.EQ_Vessels.id, > fields=[db.EQ_V

[web2py] Re: form grid Order by a Field Value in the Parent Table

2017-09-12 Thread tim . nyborg
Your grid should be using a query that brings in both tables, rather than just the Voyages table: def Voyages(): Voyages = SQLFORM.grid(db.EQ_Voyages.Vessel == db.EQ_Vessels.id, fields =[db.EQ_Vessels.VesselName, db.EQ_Voyages.VesselNumber], csv=False, orderby =[db.EQ_Vessels.VesselName, db.EQ