Re: [web2py] Re: form error: duplicate field in table no_table

2016-11-09 Thread Alex Glaros
got it. Thanks Richard! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2p

Re: [web2py] Re: form error: duplicate field in table no_table

2016-11-09 Thread Richard Vézina
You can manipulate the field name, you can handle the insert/update by yourself instead of using _filter_fields(), to do so you can create cutstom fields with Field() or .clone() field (better)... But the way you make it, if the resulting form satisfy you, you may consider changing FK name from ta

Re: [web2py] Re: form error: duplicate field in table no_table

2016-11-04 Thread Alex Glaros
just re-read documentation for factory which says: This only works when the tables don't have field names in common. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report I

Re: [web2py] Re: form error: duplicate field in table no_table

2016-11-04 Thread Alex Glaros
that's correct Richard, I use the same foreign key name in two tables. But how to handle properly as you imply? Give it some sort of alias name somewhere? In below form, field organization_fk exists in both tables db.auth_membership, and db.meeting_segment. organization_fk is not mentioned i

Re: [web2py] Re: form error: duplicate field in table no_table

2016-11-04 Thread Richard Vézina
You must have use the same field name for referenced field in both table and didn't handle this properly while using .factory(), since you lost table_name for disambiguation you get this trace back... Richard On Fri, Nov 4, 2016 at 11:53 AM, Anthony wrote: > On Thursday, November 3, 2016 at 11:

[web2py] Re: form error: duplicate field in table no_table

2016-11-04 Thread Anthony
On Thursday, November 3, 2016 at 11:19:21 PM UTC-4, Alex Glaros wrote: > > I think this error arises when two tables in factory have same field name. > I usually get around this by naming one of the fields differently, but best > practice is to name same foreign key identically in all tables it i

[web2py] Re: form error: duplicate field in table no_table

2016-11-04 Thread Alex Glaros
The only other way I can think of getting around this is, instead of renaming the table fields, create virtual fields and insert values using the insert method. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c