[web2py] reference field set to be null or in db but now the form does not display a dropdown with the values

2013-03-09 Thread memo
I have the below stated table definition: I want the field f_building_complex to be either NULL or to be referenced to the t_building_complexes. Thus I have added the requires=.. But now the sqlform displays a text box instead of a dropdown. What to do? Thanks db.define_table('t_addresses',

[web2py] Re: reference field set to be null or in db but now the form does not display a dropdown with the values

2013-03-10 Thread memo
What should be used instead? -- --- 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.go

[web2py] smartgrid showing values from cascading foreign tables.

2013-03-10 Thread memo
I have tables: cities counties neighboorhoods streets The tabels are connected through foreign keys as follows: streets->neighborhoods; neighborhoods->counties, counties->cities When displaying streets through smartgrids, I'd like also to show for each value in streets the neighborhhod (this is

[web2py] Re: smartgrid showing values from cascading foreign tables.

2013-03-11 Thread memo
Thank you! Can u give me a sample query as I'm a total newbie here. Sorry :) On Sunday, 10 March 2013 14:52:01 UTC+2, memo wrote: > > I have tables: > cities > counties > neighboorhoods > streets > > The tabels are connected through foreign keys as follo

[web2py] Compute fields are not computed on insert

2013-03-24 Thread memo
Hi, I have added computed fields to db model, but they are not computed on insert. Code is supplied below. Thanks db.define_table('t_invoices', Field ('f_customer', type='reference t_customers', label=T

[web2py] SQLFORM.factory - is it possible to add multiple child objects to one parent in one view?

2013-03-24 Thread memo
Hi, Here the codes. Is there a quick way add multiple child objects to a parent in one page? db.define_table('t_invoices', Field ('f_customer', type='reference t_customers', label=T ('Cu