the format parameter is a formatting string, no need to include that in
parenthesis
format='%(field)s - %(another_field)s'
On Sunday, October 14, 2012 9:00:57 AM UTC+2, Kenneth wrote:
>
> Wauu, thanks Bill.
>
> That was exact what was missing. I was looking in completly different
> directions.
>
> Anybody else reading this, the correct notation is:
> format=('%(asset_category_name)s')
>
>
> Kenneth
>
> I'm certainly no expert but I might try to define:
> ref_asset_category.format=('%(asset_category_name)s') or something like
> that.
>
> Check my syntax of course. Hope it works.
>
> -Bill
>
> On Saturday, October 13, 2012 7:11:35 PM UTC-5, Kenneth wrote:
>>
>> Hello,
>>
>> this is my first time trying to connect to a legacy database. My
>> database models file looks like this:
>>
>> db.define_table('ref_asset_category',
>> Field('asset_category_id', type='id'),
>> Field('asset_category_name', type='string'))
>>
>> ########################################
>> db.define_table('assets',
>> Field('asset_id', type='id'),
>> Field('asset_label', type='string'),
>> Field('asset_category_id', 'reference ref_asset_category'))
>>
>> When using crud to edit a assets record the asset_catefory_id is only
>> shown as an text box, not as an drop down selection box.
>>
>> What am I doing wrong?
>>
>>
>> Kenneth
>>
>> --
>
>
>
>
>
>
--