Hi, Dave. Yes, that seems to be an accurate summary of what I was 
attempting to do.


On Friday, May 8, 2015 at 3:25:24 PM UTC-5, Dave S wrote:
>
>
>
> On Friday, May 8, 2015 at 11:55:13 AM UTC-7, Spokes wrote:
>>
>> I'd like to create a grid based on criteria relating to a primary table, 
>> and a table that references that primary table. Slightly modifying the 
>> example from the web2py docs, let's say the primary table is 't_person', 
>> and it's referenced by the table, 't_thing'. I'd like the grid to list 
>> 't_person' entries that are referenced by a 't_thing' entry with a value 
>> 'table' for the 'name' field, and by a 't_thing' entry with value 'chair' 
>> for the name field (that is, entries that meet both criteria, not one or 
>> the other). 
>>
>>
> Let's see if I understand this.  You want to use the set A of t_things 
> that have value 'table'  and the set B of t_things that have value 'chair' 
> and find those members of t_person that are referenced by both sets?  Sort 
> of "for a in A where a.owner_id == b.owner_id for b in B, select p from 
> t_person where p.id == a.owner_id ?
>
> /dps
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to