Can anyone please show example of how to capture the ID of a record that is 
the result of a form search?


Does it involve using the request.vars.id?


I read the chapters but need more specific format example.


Thanks,


Alex


On Tuesday, April 2, 2013 5:48:26 AM UTC-7, Cliff Kachinske wrote:
>
> Look here to understand models, views and controllers 
> http://web2py.com/books/default/chapter/29/01
>
> Two excellent examples to show how much code should go into a view are 
> views/default/index.html and views/layout.html.
>
> Look here to understand about parent and child records 
> http://web2py.com/books/default/chapter/29/06#One-to-many-relation
>
> Continue reading through this also 
> http://web2py.com/books/default/chapter/29/06#Many-to-many
>
>
> On Monday, April 1, 2013 2:04:04 PM UTC-4, Alex Glaros wrote:
>>
>> Can anyone show the syntax for getting the parent ID from a record that I 
>> have just retrieved as a result of a search? 
>>
>> Related to my request, there's a great example on how to create a loop 
>> for adding child records to a parent on the slices website:  
>> http://www.web2pyslices.com/slice/show/1612/ajax-adding-child-records-to-parent.
>>  
>> The slices example shows a looping child addition for all of the parents. 
>>  I want to focus on just one parent record that is the result of a search.
>>
>> I'd like an example showing a parent record getting searched for, then 
>> having that one parent ID captured in a global variable, so I can pass it 
>> on as a FK for the children records.  I'll use the slices example to add 
>> the child records.
>>
>> What is additionally confusing for me is knowing what parts go in the 
>> viewer and what parts go in the controller.
>>
>> Thanks,
>>
>> Alex Glaros
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to