Re: [web2py] Re: Extracting row id from url using request.args

2012-11-21 Thread Mike Pixael
Wow Cliff thank you for this superb bit of info. Like all the best problems it seems glaringly obvious to me now. Thank you everyone for your help. Mike On Wed, Nov 21, 2012 at 2:40 AM, Cliff Kachinske cjk...@gmail.com wrote: It's been a while since I've played with smartgrid, but I seem to

Re: [web2py] Re: Extracting row id from url using request.args

2012-11-20 Thread Michael Hall
In the end I have used a different slightly more messy approach. I am getting the record id from the args by using a conditional to test if it is in one of 2 possible positions. @auth.requires_login() def contact_manage(): form =

Re: [web2py] Re: Extracting row id from url using request.args

2012-11-20 Thread Cliff Kachinske
It's been a while since I've played with smartgrid, but I seem to recall that the ID of the record being edited was always the final arg. And you can treat request.args as a list, so the ID of the record being edited is request.args[-1], or so it seems to me. On Tuesday, November 20, 2012

[web2py] Re: Extracting row id from url using request.args

2012-11-19 Thread villas
If you cannot control the order of args, you could still look for an int, but that may not always be reliable. I sometimes decide to use vars instead. Then you know exactly what you have: your/url/here?id=1234 Construction of the url is easy using the URL helper. On Friday, November 16,

[web2py] Re: Extracting row id from url using request.args

2012-11-19 Thread Michael Hall
Hi Villas I like the idea of getting the ID from a var instead of args, however I am still not sure how to go about getting the ID of the current record I am viewing/editing in smartgrid. Forgive my noobishness. M On Monday, 19 November 2012 08:57:09 UTC, villas wrote: If you cannot

[web2py] Re: Extracting row id from url using request.args

2012-11-19 Thread Michael Hall
Hi Villas I like the idea of using a var instead of args but I am still uncertain of how I get the ID of the current record I am viewing/editing in smartgrid. Mike On Monday, 19 November 2012 08:57:09 UTC, villas wrote: If you cannot control the order of args, you could still look for an

Re: [web2py] Re: Extracting row id from url using request.args

2012-11-19 Thread Johann Spies
On 19 November 2012 14:58, Michael Hall pix...@gmail.com wrote: Hi Villas I like the idea of using a var instead of args but I am still uncertain of how I get the ID of the current record I am viewing/editing in smartgrid. Here is an example of code I am using where 'auid' represents the id