Views
A view is a list of objects. You can define which object data will be displayed in the list and how it will be ordered. View is assigned to an object type and the class.
How to create a view
To create a view, go to Administration > Metadata > Views and select New View.
First, give a view a name and save it. This will create a view and open a Columns section.
Attribute | Description |
---|---|
Name | Name of a view |
Order by key | A column by which the list will be ordered initially. You can still order the list the way you need when you open it. |
Descending order | If checked, the list will be arranged in a descending order. If not, ascending order is applied (default). |
COLUMNS
Columns display some data of an object (object attribute, files, links, actions etc).
To add columns to the view, select New Column.
General - tab:
Attribute | Description |
---|---|
Label | Name of a column. |
Key | Enter the key of a form attribute you want to display in the list. |
Type | Type of values that will be listed in the column. This is required only when the control is set to Value. |
Control | Here, choose what type of data will be displayed in the column. To display object data, select Value. |
Order | Position of a column in a view (1st, 2nd, etc). |
Editable | If it is possible to 'inline edit' this column from the view. Works only in form view for number, text, boolean and date. |
Editable statuses | All statuses are editable if empty. Works only in form view |
Roles required to edit | All roles are allowed if empty. Works only in form view |
Width | Works only in form view |
Advanced - tab
Params - possibility to define the parameters for the columns of certain type of controls. For example for Type=Date , there is possibility to define Params in a way that will color up the background of the column depending on the value:
{
"warningBefore": 2,
"dangerAfter": 3,
"notifySuccess": false,
"notifyStatuses": ["dknj94yv7Y84kubwH5Rl","SqqdcjE6DrQkeLpHIIbm"]
}
In above example:
- (notifyStatuses) coloring is turned on only for two document statuses: 'Active' and 'Pending'. Statuses ids are delivered in "statusid" with separation by coma. This way consultant can regulate the logic of colorful notification - for which stages (statuses) of the document lifecycle the notification should be displayed,
- (warningBefore) when it is 1 day or closer before the date stated as the value of the column, the background is colored in yellow,
- (dangerAfter) when it is 1 day or more after the date stated as the value of the column the background is colored in red.
You can find the definition of the alternative - filtered views in Class definition, in 'Filtered View' tab: