You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 17 Next »
What is REM?
To answer this question, we need to provide some theory first.
Thesis 1
In SimpleOne, you can handle with data which is represented as records in tables that have a specified attribute set. Records appear in tables and they have these attribute values given.
Thesis 2
Every table has its own data model stipulated by the business-logic. The data model is represented by the column set (their amount, types, links with another system objects, and so on). This data model can be extended with child table with the same attribute set as a parent one, and an individual attributes inaccessible from the parent table, as an addition.
Attributes extension curcuit diagram
Conclusion
To manage the commonalous entities (like ITSM Tasks), we can create a table with appropriate column set and extend from it for Incidents, Change Requests, Problems, and so on, creating respective tables that inherit attributes (columns) from a parent one and besides have their own attributes. For example, attribute overlap in there may be 70%, and unique attributes will be 30% of the total.
In this case, this model works fine (when we do not have many child tables, and the attribute overlap is high). But when the child table number increases, and the attribute overlap decreases, the management of this data model becomes a challenge. A Request Catalog can be taken as an example of such a table (a parent table for the catalog and a record in the table for every request template with specific attributes).
To deal with this issue, another concept has been created and implemented - Record Extended Model.
REM Concept
In this concept, extension concept can be applied for a specified table record giving some featured atrributes to it.
Physically, extension model are stored as records of the Models (sys_re_models) table, and they intended to collect specific attributes extending records. Attributes are stored as records of the Attributes (sys_re_attribute) table (extending the Columns (sys_db_column) table).
When a record extension model is applied to a record, it means that an auxiliary record set is created for this record containing information about specific attribute values. So the record has attributes inherited from a table, and in addition, it has attributes sourced from the extension model.
Configuring extension models
Generally, to configure your extension model, you need to:
- Create an extension model.
- Create attributes (and link it to the model).
- Configure RE client script if needed.
Creating models
To create a record extended model, please complete the steps below:
- Navigate to Record Extended Model → Models.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
Record extended model form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | The model name. |
Title | Y | The model title. Can be specified in a language other than English. |
Description | N | The model description. |
Table | Y | Reference to a table affected by the model. Please note that you cannot specify a read-only table. To use such a table, please turn off this attribute first. |
Active | N | Select this checkbox to make the model active or inactive. |
Icon | N | Reduced image intended for the model identification. |
After insert script | N | Specify a script that should be executed after a record is created. Develop it using JavaScript extended by the SimpleOne Server-Side API and Client-Side API methods. |
Related lists | ||
Attribute | List of the RE attributes linked to this model. | |
Model client script | List of the RE client scripts linked to this model. | |
Model form element | List of the RE model form element linked to this model. |
Configuring attributes
To create an attribute, please complete the steps below:
- Navigate to Record Extended Model → Attributes.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
Attribute form fields
Field | Mandatory | Description |
---|---|---|
RE model | Y | Reference to a previously created model. |
Column type | Y | Specify a column type. |
Title | Y | An attribute title. Can be specified in a language other than English. Latin, Cyrillic letters, [0..9] numbers and the underscore symbol ( _ ) are allowed. |
Column name | Y | A column system name. Latin letters, [0..9] numbers and the underscore symbol ( _ ) are allowed. |
Map to Column | N | Specify a target field to map the attribute value after the record is created. This option allows nimble transferring of the attribute values to fields. Please note that if the target field is mandatory, then the value is saved before it is processed by server validation engine. Also, if the target field is mandatory, it should be not displayed on the form, otherwise the client validation engine may hamper the record saving. |
Comments | N | Put here some comments describing your attribute. |
Active | N | Select this checkbox to make the attribute active or inactive. |
Read only | N | Select this checkbox to make the field adding by this attribute read-only. |
Mandatory | N | Select this checkbox to make the field adding by this attribute mandatory. |
Full text search | N | Select this checkbox to make the field adding by this attribute indexable. |
Display by ref | N | Select this checkbox to make the field adding by this attribute display its displayValue instead of a value (see the Display by ref description for more information) |
Unique | N | Select this checkbox to make the field adding by this attribute unique. |
Type Specification tab | ||
Max Length | N | (For the columns that have a String or Text type) Specify a maximum value length for this column. The value length cannot exceed allowable length for the specified data type. |
Default value tab | ||
Default value | N | Specify a default value that will be populated to the field when creating a new record. This field may be specified by a Javascript scenario as well. |
Use dynamic default | N | Select this checkbox if you want to generate the default value dynamically. |
Dynamic default | N | This field appears only when the Use dynamic default attribute is set to TRUE. Select the script from the Dynamic Default Values (sys_default_value_dynamic) dictionary, so its execution result will be automatically calculated and entered into this field; this value will be the default value for the column specified.
|
Configuring model client scripts
To create a record extended model client script, please complete the steps below:
- Navigate to Record Extended Model → Model Client Scripts.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
Model client script form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Client script name. |
RE model | Y | Reference to a previously created model. |
Table | Y | Reference to a table affected by a model. |
Type | Y | The script type:
|
RE attribute | N | Reference to a previously created model attribute. This field is mandatory. |
Description | N | Client script description. |
Active | N | Select this checkbox to make the script active or inactive. |
Order | N | Client script execution order. Scripts are executed in ascending order. |
Script | N | Specify a client script. Develop it using JavaScript extended by SimpleOne Client-Side API methods (the SimpleForm class). |
- No labels