Re: [web2py] Re: smartgrid orderby descending

2014-03-10 Thread Jake Lowen
. Sorry I'm not more help. J On Fri, Mar 7, 2014 at 6:41 PM, Dan Kozlowski bwdr...@gmail.com wrote: Jake, Did you ever get this to work ? Reason being I think I have the same problem. On Sunday, April 21, 2013 9:47:59 AM UTC-5, Jake Lowen wrote: In a normal grid the orderby descending

[web2py] smartgrid orderby descending

2013-04-21 Thread Jake Lowen
In a normal grid the orderby descending works just fine: grid = SQLFORM.grid(db.meetings, orderby=~db.meetings.meeting_date, ) But I can't get the parent table of a smart group to sort the same way: grid = SQLFORM.smartgrid(db.meetings, linked_tables=['meeting_docs'],

[web2py] Re: scheduler on webfaction

2013-04-11 Thread Jake Lowen
Simultaneously with Niphlod's reply also came this from webfaction customer support: You can use the nohup command at the start of this command to make it immunte to hangups, like when you are exiting your ssh session. http://linux.die.net/man/1/nohup Or you can use disown to disassociate

[web2py] scheduler on webfaction

2013-04-09 Thread Jake Lowen
Hi. I have web2py installed on webfaction as my production server. I followed the web2py documentation on it's scheduler function and built an app where everything works as anticipated. (very cool!) In order to run the scheduler though I need to SSH into the server and run this command: python

[web2py] Re: Is it possible to use grid style search to filter records before handing off to another function?

2013-03-31 Thread Jake Lowen
is submitted, you can use SQLFORM.build_set([list of fields], keywords=request.vars.keywords) to get the DAL Set object associated with the search. Anthony On Saturday, March 30, 2013 7:05:17 PM UTC-4, Jake Lowen wrote: I like the way that SQLFORM.grid search works. Once I've searched

[web2py] Re: Is it possible to use grid style search to filter records before handing off to another function?

2013-03-31 Thread Jake Lowen
of the grid DOM. When you submit the form, the query will be available in request.var.keywords, which you can then pass to the SQLFORM.build_query() method to generate the DAL Query. Anthony On Sunday, March 31, 2013 11:52:56 AM UTC-4, Jake Lowen wrote: I appreciate the answer, but I can't figure

[web2py] Is it possible to use grid style search to filter records before handing off to another function?

2013-03-30 Thread Jake Lowen
I like the way that SQLFORM.grid search works. Once I've searched for records and come up with the set I want, How can I pass that set off to another function to do work just on those filtered records? Or in other words.. if I have 100 records, and I use the grid search to narrow it down to

[web2py] Problem with difficult query

2013-02-07 Thread Jake Lowen
Thanks for a great framework. I'm loving web2py, but I just encountered a difficult query One query generates a list of people. Each of those persons has 0 to many reports filed about them. I wanted to see only the newest report on each person AND I want to see Null or None if no reports have

[web2py] Re: Problem with difficult query

2013-02-07 Thread Jake Lowen
If it helps, here is how I can get the desired result in raw SQL: SELECT * FROM benchmark_targets t2 LEFT JOIN (SELECT * from lobby_report GROUP BY KPID ORDER BY datetime DESC)t1 ON t2.KPID = t1.KPID; Now how to do it in DAL? -- --- You received this message because you are subscribed to

[web2py] Re: Problem with difficult query

2013-02-07 Thread Jake Lowen
Forgot the WHERE in my SQL statement. Should be: SELECT * FROM benchmark_targets t2 LEFT JOIN (SELECT * from lobby_report GROUP BY KPID ORDER BY datetime DESC)t1 ON t2.KPID = t1.KPID WHERE t2.benchmark = 10; -- --- You received this message because you are subscribed to the Google Groups

[web2py] Re: Problem with difficult query

2013-02-07 Thread Jake Lowen
I'm only talking to myself here, but the notes are helpful... This is how I get the desired result in web2py using the executesql command: foo = db.executesql('SELECT * FROM benchmark_targets AS t2 LEFT JOIN (SELECT * from lobby_report GROUP BY KPID ORDER BY datetime DESC) AS t1 ON t2.KPID =

[web2py] Re: Problem with difficult query

2013-02-07 Thread Jake Lowen
Solved: It was a dumb mistake.. I was trying to group by a field in the left join table.. so of course it was eliminating all records not found in the second table. I switched the group by to a first table field and all is well. Final working query was: foo =