OK, i will try. Thanks!

On Wednesday, May 8, 2013 4:02:47 PM UTC+2, Anthony wrote:
>
> OK, looks like you can't do a join. Instead, you can just use recursive 
> selects (though this will do a separate select for each item in the list):
>
> requires=IS_IN_DB(db, "report_attribute.id", lambda row: row.
> entry_attribute_id.name,
>                   zero=T("-- Odaberite --"))
>
> row.entry_attribute_id.name does a select from the db.entry_attribute 
> table for each item. The other alternative is to build the set yourself 
> (using a join) and use IS_IN_SET() instead.
>
> Anthony
>
> On Wednesday, May 8, 2013 8:41:32 AM UTC-4, Domagoj Kovač wrote:
>>
>> This gives:
>>
>> <type 'exceptions.AttributeError'> 'Row' object has no attribute 
>> 'entry_attribute'
>> On Wednesday, May 8, 2013 2:37:54 PM UTC+2, Anthony wrote:
>>>
>>>
>>> requires=IS_IN_DB(db(db.report_attribute.entry_attribute_id == db.
>>>> entry_attribute.id), "report_attribute.id", '%(entry_attribute.name)s',zero
>>>> =T("-- Odaberite --"))
>>>>
>>>>
>>> How about:
>>>
>>> requires=IS_IN_DB(db(db.report_attribute.entry_attribute_id == db.
>>> entry_attribute.id), "report_attribute.id",
>>>                   lambda row: row.entry_attribute.name, zero=T("-- 
>>> Odaberite --"))
>>>
>>> Anthony
>>>
>>

-- 

--- 
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