# Rack Database Structure: Labels table

This table is used when drawing the interface forms. Most of the forms are autogenerated from the database itself, so that new fields can be added easily. This table defines what labels the fields have, whether they are drawn or hidden and in some cases what the possible values for them are.

The tblname and field columns are to identify which database field this is a label for. The label column is the text of the label. If this column has a value of NULL, then this field will be hidden on the form (this is used for things like idx in racks, which there is no reason for the user to change).

The linktable and linkfield columns are for constraining the values with a combo box. If these are non-NULL, then a combo box is built that only allows this field to have values that are present in the linkfield column in the linktable table. For example, if the linktable is "topology" and the linkfield is "name", then when drawing the interface window, a combo box will be created for this field and populated with the values returned by "select distinct name from topology". This field will be forced to correspond to a topology name.

Fields
tblname | string | This defines which table the field for this label is in.
field | string | The name of the field this is a label for
label | string | The text of the label
linktable | string | Used for constraining the values to link them to another table
linkfield | string | Used for constraining the values to link them to another table