>
> Still, if I understand correctly I'd have to setup a AJAX call requesting
> the default values to prepopulate the fields with the defaults matching the
> table?
> Or else maybe when creating the table for the user, I could enter the
> default values. I'm trying to imagine though how I would
Ok here's what I want to do.
I want a user to be able to create multiple tables of data, with some
information about every table.
So instead of creating more tables, I figured I'll have one big table of
data with a reference to the record in the table_settings database so I can
return to the us
On Sunday, December 11, 2011 1:53:11 PM UTC-5, tsvim wrote:
>
> db.define_table('table_settings',
> Field('name','string'),
> Field('default_value','string'))
>
> db.define_table('data',
>
> Field('parent_table',db.table_settings,writable=False,reada
SOrry, email editor mangled the text. SHould read:
db.table_settings['parent_table'].default_value.default
On Dec 12, 12:21 pm, Nik Go wrote:
> db.table_settings.default_value.requires = IS_IN_SET(['a','b'])
> db.table_settings['parent_table'].default_value*.default*
>
> I think this is what you
db.define_table('table_settings',
Field('name','string'),
Field('default_value','string'))
db.define_table('data',
Field('parent_table',db.table_settings,writable=False,readable=False),
Field('datetime','datetime',default=request.now
Sorry, not sure exactly what you mean? Can you provide more detail -- maybe
show some code?
On Sunday, December 11, 2011 1:35:35 PM UTC-5, tsvim wrote:
>
> Obviously you're right. I realized later that I needed to re-think what I
> was trying to do.
> The id of current user is stored in the data
Obviously you're right. I realized later that I needed to re-think what I
was trying to do.
The id of current user is stored in the data table. Is there a way I can
refernce that field in the line you gaveme?
Thanks for all your help.
Assuming you have the record id of the current user from the 'user_table'
table, maybe something like:
Field('x', default=db.user_table[id of current user].default_x)
You cannot just refer to the field (which doesn't identify the specific
user) -- you have to select the specific value for t
8 matches
Mail list logo