Structure
Structures are used to create, update, search and view data. They are at the core of the applications and present on about every pages. They are the work of ten structure* interacting tables.
Contents |
structures
This is the parent table of all the structure tables. The framework uses the alias field to access the structures.
structure_fields
The information stored here represent references to sql queries select fields. Since most of the queries generated by the framework return their selected field in the [Model].[Field] form, most of the rows here are also having that form. For instance, a field referred by the following querry would have AliquotMaster as model and barcode as field.
SELECT barcode FROM aliquots_masters AS AliquotMaster
As you might be willing to write custom queries, like for the ad-hoc module, you can divert from that form and have your own custom model-field pair. What is important to keep in mind is that these fields are linked to the fields aliases returned by the sql query.
structure_formats
The structure_formats table is what links the structure table to structure_fields. The linking is made through structure_id and structure_field_id. The fields can hereby be used by multiple structures.
Here, you define, for each fields, where they are going to appear.
| Flag name | The field will appear when you are in |
|---|---|
| flag_add | add view |
| flag_edit | edit view |
| flag_search | search view |
| flag_addgrid | addgrid view |
| flag_editgrid | editgrid view |
| flag_detail | detail view |
| flag_index | index view |
| flag_summary | a sumary |
Some of those fields have their _readonly extension. If set to true, the control will simply be in readonly mode, thus unmodifiable by the user.
See also
What are the settings/options available when building a form structure?