Shoot, should have thought of that.

Will try when I get back to the office.

Jim
 On Apr 12, 2013 12:04 PM, "Anthony" <abasta...@gmail.com> wrote:

> It probably should work, but for some reason, the code converts the Row to
> a dict before doing the string formatting, and that breaks for Rows
> involving joins. For now, you can use a lambda instead:
>
> lambda r: r.product.productName
>
> Anthony
>
> On Friday, April 12, 2013 12:38:09 PM UTC-4, Jim S wrote:
>>
>> Tried that already but got the same error.
>>
>> Jim
>>  On Apr 12, 2013 11:32 AM, "Anthony" <abas...@gmail.com> wrote:
>>
>>> Since you are joining tables, you might need to use the
>>> "tablename.fieldname" format to refer to the field in question. Does
>>> '%(product.productName)s' work (assuming "productName" is in the db.product
>>> table)?
>>>
>>> Anthony
>>>
>>> On Friday, April 12, 2013 11:59:59 AM UTC-4, Jim S wrote:
>>>>
>>>>     requires = IS_IN_DB(db((~db.productSite.**p**roductSiteId.belongs(*
>>>> *currentIt**ems)) &
>>>>                            (db.productSite.**availableAddo**n==True) &
>>>>                            (db.productSite.siteId==**worko**rder.siteId)
>>>> &
>>>>                            (db.product.productId==db.**pro**
>>>> ductSite.productId)),
>>>>                         db.productSite.productSiteId,
>>>>                         '%(productName)s', zero='..')
>>>>
>>>> I get a trace back with this.  If I pull out the '%(productName)s' it
>>>> works.   But, I want to specify the field name to display being a field in
>>>> the table linked by the 4 'anded' query.
>>>>
>>>> Help?
>>>>
>>>> -Jim
>>>>
>>>  --
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/web2py/vb0268kC_mc/**unsubscribe?hl=en<https://groups.google.com/d/topic/web2py/vb0268kC_mc/unsubscribe?hl=en>
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> web2py+un...@**googlegroups.com.
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/vb0268kC_mc/unsubscribe?hl=en.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to