Data types
A field has exactly one of six data types. The list is fixed; there is no free type text.
| Type | For | Example |
|---|---|---|
text |
text of any length | Comment, PartNumber |
integer |
whole number, counted | GoodParts, Scrap |
numeric |
decimal number, measured | CycleTime, Downtime |
timestamptz |
an instant with time zone | Timestamp |
boolean |
yes/no | LineStopped |
file |
an attached file | Photo |
integer and numeric stay separate because in manufacturing you either count or you measure.
A file field holds the reference to the file, not the file itself.
Changing a type
Section titled “Changing a type”Change type in the field grid moves a field to another type. TrakState treats that in three grades:
Runs without a prompt — the conversion can never fail:
integer → numeric · integer → text · numeric → text · boolean → text ·
timestamptz → text
Is checked first — every other change. TrakState first tries every stored value against the new type. If they all convert, the change runs like the ones above. If even one does not, nothing is changed: a dialog says {{bad}} of {{total}} value(s) cannot be converted and lists up to five of them. The field keeps its type until those values have been corrected or removed; the Data view on this page shows records but does not edit them.
Is not allowed — any change from or to file: This type conversion is not allowed. A file
reference is not a number or a text value, and the other way round.
The promise behind it: no operation silently throws records away. Whatever can be lost is counted and named first.
Where the type still acts
Section titled “Where the type still acts”The type is checked when a record is saved, and it is checked on the server — not only in the
mask. An integer field takes no abc, a required field takes no empty value. That holds for
every route in: capture mask, machine, script.