From OpenSCADAWiki
The storehouse classes are stored in the table "classes" with the fixed table structure "CLASS, ID, NAME, TP , TBL, FILTER, PROC", where:
- CLASS [varchar(20)] — class ID;
- ID [varchar(20)] — specific field ID of the class;
- NAME [text] — specific field localised name of the class, where the first line for the default value and the next lines form in the view {2SymbolLang}:{LocalizedText};
- TP [varchar(100)] — specific field type of the class, which correspond directly to the MySQL data types and some specific ones:
- "file[:{max}[:{storage}[:{MIME}[:{OverViewSz}]]]]" — attaching files with the parameters:
- max — maximum files allowed to attach;
- storage — storage of the files on the File System with the specified path, and empty to store directly in the DB field of the type LONGTEXT;
- MIME — files type, allowed to attach-load, where empty for any and like to "image/*" for only images;
- OverViewSz — enable a field of the image files overview on the item form with the specified size in pixels.
- TBL [varchar(100)] — specific field properties of representing data in the table, has the format {align}:{width}:{pos}, where:
- align — column alignment, supports the values: "left", "center", "right"; where the "left" value is default one for strings and "center" for other;
- width — forced width for the column, in percents at symbol "%" in the end or in pixels;
- pos — the column position in the string view, so you can write that like to "005" for true sort.
- FILTER [text] — specific field properties of filtering and indexing lists preparing for the filter selection, for the variants: index and list{SepSymb}, where:
- index — the column value means as whole one for indexing;
- list{SepSymb} — the column value means as a list of items for indexing, separated by symbol SepSymb.
- From the second line you can specify rules of the highlighting in the form "{ID}:{FLGS}:{color}:{font}", where:
- ID — indexed or listed value in the cell;
- FLGS — flags list in values [0|1], currently that is only "Highlight [Cell|Row]";
- color — the background color;
- font — the text font.
- PROC [text] — a procedure of calculation the cell value on the internal language JavaLikeCalc.JavaScript of OpenSCADA, the column is become the logical one; cells of the logical columns aren't accessible for the manual edition; all cells of the record-row are accessed in the procedure as them IDs, including the calculated one which you have to assign in some value; you can use that feature also as a temporary one, that is install a procedure for calculation and next clean up that;