Automatic detection of foreign keys, display of data
Posted: 2015-12-24 22:55
Since fields named 'id' are automatically configured as primary keys, it would be useful if fields named 'tablename_id' we detected as foreign keys and automatically configured as lookups. Basically, set the field datatype to integer and make the lookup into the 'tablename' and use the first field that's not 'id' as the display value.
Related, it would be useful to have 'autofill' be complemented by a "display fields' list. This would lookup the field(s) and display it(them) in forms and views, but it would no be part of the table. For example, if the lookup is by id into the customer table, we might want to display "name" and "phone" number for the customer record, but neither edit nor retain it as part of the current table.
This could also be accomplished by allowing computed fields to be defined. Part of the form display structure, but not input/edit elements.
Related, it would be useful to have 'autofill' be complemented by a "display fields' list. This would lookup the field(s) and display it(them) in forms and views, but it would no be part of the table. For example, if the lookup is by id into the customer table, we might want to display "name" and "phone" number for the customer record, but neither edit nor retain it as part of the current table.
This could also be accomplished by allowing computed fields to be defined. Part of the form display structure, but not input/edit elements.