Hi Johann I'm really struggling to figure out the DAL query syntax (the documentation I could find has minimalistic examples)...
So, can you please help me - how do I do this: "as long as all the tables are presented in the original query" query = ? form = SQLFROM.grid(query,...) I.e. I need a grid that displays all data from all 10 of my tables so my users can run a complex query on any of them including joins? (Note 1: I would prefer the original grid to be blank - having all rows from all tables would be meaningless and crowded) (Note 2: I have achieved some degree of success trying to do this from "appadmin" but that doesn't use grids :( and I'd prefer to give my users a cleaner interface... ) Thanks! Roderick On Mar 1, 8:51 am, Johann Spies <[email protected]> wrote: > On 29 February 2012 16:44, Roderick <[email protected]> wrote: > > > Thanks Johann! > > > 1. Can this be done with smartgrid? > > Not in a similar way. You can read more about that > inhttp://www.web2py.com/books/default/chapter/29/7?search=smartgrid#SQL... > > > 2. Can you give me an example of a dynamic query (e.g. what users > > would type into the search field)? (for grid or smartgrid). > > Here is one built with the query button on one of my grids: > > akb_articles.title contains "water" and akb_articles.pubyear > "1990" and > akb_articles.pubyear <= "2010" > > Experiment for yourself and explore the options. > > There is also a slice with examples on using SQLFORM.grid > athttp://www.web2pyslices.com/slices/take_slice/148 > > Regards > Johann > -- > Because experiencing your loyal love is better than life itself, > my lips will praise you. (Psalm 63:3)

