To ensure that you will never run out of free-text fields, the concept of “Property” fields are now available on the following data entities: Resource, Project, Order, Route, Operation, Constraint, Material, Material Transactions, and Warehouse.
A property field is a special type of database field, being able to store multiple values in the same column field. You as a user however will not see this, as each value will have its own column in the tables.
Adding property columns to tables
Use the normal field chooser and a self-chosen column name and “Property ID”. As an example in order to add a new column holding a “Length” assigned to the production
order, do the following:
- Right click the order list table header and select “Field chooser”
- Find the “Production order->Property” field in the left side tree – then click the right arrow
- Edit the “Field name” text field. This will be the column name shown in the table
- Edit the “Property” text field. This value must be unique between all Production Order property fields you will ever use. Keep it fairly short, i.e. max 5 chars (to save database size)
- Close the field chooser window
Formatting property columns
When adding a property using the field chooser, it is possible to format the value using different types. The types are defined below.
The default format type is a string. Use this when no formatting is required.
When selecting format type Date, a storage format and display format field will become visible.
The storage format describes the stored format of the date in the property field. So if the dates are of the form 2018-12-31, the storage format should be set to yyyy-MM-dd.
The display format describes the format the date should be displayed in. So if the dates are stored as yyyy-MM-dd, but only the year should be visible, the display format should be set to yyyy.
For more info on date format, see the date format topic.
h3. Number format
When selecting format type Number, a display format field will become visible.
The display format describes the format the numbers should be displayed in. So if the numbers are stored with 4 decimal places e.g. 1.2345, but should only be displayed with 2 decimals, the display format could be set to 0.##.
OBS: Numbers are expected to be stored using dot (.) as decimal separator.
For more info on number format, see the number format topic.
Selecting Boolean will show the values “true” and “false” as a checkbox. Only the value “true” will result in a checked checkbox, everything else e.g. the string “test” will result in an unchecked checkbox.
Using property columns in HTML reports and Shop Floor pages
When configuring HTML reports to show property based values, then you access property based layout items by writing
<show property="operationlist.productionorder.layoutItem.productionorderproperty.Length" showAs="default" label="Length" cssClass="wideColumn"/>
Replace “productionorderproperty” with the relevant layout item. I.e. “operationproperty” for the Operation object. Etc. You can lookup the actual names in the Variable list
Importing property fields with the XML importer
It is supported to import property fields by using the
prop_valY attributes. Y is an integer value from 1 and up. This is an example of importing both a width and length property
<XXX … prop_key1="Length" prop_val1="1200 mm" prop_key2="Width" prop_val2="90 mm" prop_count="2“ />
The prop_count is default 5 (i.e. it will check for up to 5 values) unless changed on the operation import line.
Read more about the XML import option here.