Hi Johann,
         Here are the details ---

I have two tables - I need to grab the id of a contact from first
table and use it to update a field status with values as Sent, Request
etc.  in another table id being the same in both the table.
Now in the below code, "Send Request" is just a button.

links = [lambda row: A(SPAN(_class='icon plus'),'Send
Request',_class='positive
button',_href=URL("default","reqstatus",args=[row.id]))]

This code is using the id (row.id)  from my contact table which is
fine. Now, I want to use this id to send a request (using "Send
Request" button in this grid) through reqstatus function. reqstatus is
a separate function in my controller.

My problem is how can I use the row.id of this sqlform.grid  any
particular row and send a status update for a different table using
this id.

In short i want to use the above [row.id] in a separate function and
pass it in a query. How can I achieve it? I hope I am clear this time.
Let me know if case you need more details.


I checked the below link  - but could not get it
http://www.mail-archive.com/web2py@googlegroups.com/msg77334.html


Thanks, Rahul D (www.flockbird.com - web2py powered)
------------------------


On Dec 20, 6:31 pm, Johann Spies <johann.sp...@gmail.com> wrote:
> On 20 December 2011 14:25, Rahul <rahul.dhak...@gmail.com> wrote:
>
> > @Johann, below code does not work for me. :(
> >     links = [lambda row: A('Edit' , _href = URL('default',
> > 'edit_journal', args = [row.id]))]
>
> > I used details='False'  and it does not show the buttons to me, but
> > shows my custom button only which is what I intended.
>
> details = False  not details = 'False'
>
> That disable the 'View' button.
>
>
>
>
>
>
>
>
>
>
>
> > Again for the community - -----------
> > I was just wondering if I can use the row.id or any information with
> > sqlform.grid -
> > Below is the link I have defined to show a button called Send Request.
> > I have re-directed it to use a custom function "regstatus" that passes
> > a row.id argument.
> > ---code---
> > links = [lambda row: A(SPAN(_class='icon plus'),'Send
> > Request',_class='positive
> > button',_href=URL("default","reqstatus",args=[row.id]))]
> > ---
> > I want to know how can I use the row.id  (in above -> args=[row.id])
> > value and use it to make queries considering I want to use this id in
> > my function "reqstatus" above -
>
> > Example- I would like to send some request to the record (row id) on
> > which I am say a friend request etc.
>
> > Can we achieve this?
>
> It is still unclear to me what you want to do and what the problem is using
> row.id.
>
> What is 'Send Request'?
>
> Maybe if you show your code it will get clearer.
>
> Regards
> Johann
>
> --
> Because experiencing your loyal love is better than life itself,
> my lips will praise you.  (Psalm 63:3)

Reply via email to