The table structure of REM repeats the dictionary structure with tables and columns. Instead of columns, Attributes (sys_re_attribute) are used in REM. You can connect REM attributes with a table within the Model (sys_re_model). Besides, you can create attribute collections as universal sets of attributes that can be used in several models at the same time.
You can access to dictionaries related to REM through the Record Extended Model (REM) menu category.
Every table has its own data model specified by the business-logic. The data model is represented by the column set. This data model can be extended with child table with the same attribute set as the parent one, and individual attributes inaccessible from the parent table, as an addition. For example, the diagram below shows that all attributes of the User table are inherited by the Employee table:
Attributes extension circuit diagram
When there are not many child tables, and the attribute overlap is high, this data model works fine. But when the child table number increases, and the attribute overlap decreases, the management of this data model becomes a challenge. Data model with big and complicated table inheritance structure has some disadvantages:
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 each request template with specific attributes.
To deal with this issue, Record Extended Model concept has been created and implemented. Extension concept can be applied to a specified table record, giving some additional attributes to it.
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.
Generally, to configure your extension model, you need to:
In the diagram below, you can see the difference between models and collections. Models are created with a specific attribute set that can only be used in this model. Collections contain attributes that can be applied to different models.
It is not recommended to create collections with many attributes. It is better to create one collection with one attribute. |
To create a model, complete the steps below:
Record Extended Model form fields
Field | Mandatory | Description | |
---|---|---|---|
Title | Y | The model title. Can be specified in a language other than English. | |
Table | Y | Reference to the table affected by the model.
| |
Description | N | Type model description. | |
After insert script | N | Specify a script that should be executed after a record is created. Develop it using JavaScript extended by the SimpleOne SimpleRecord Server-Side methods. | |
Active | N | Select the checkbox to make the model active or inactive. | |
Icon | N | Small image intended for model identification. | |
Related Lists | |||
Attributes | List of the attributes linked to this model. | ||
Model Form Elements | List of the form element linked to this model. | ||
Used Collections | List of applied collections | ||
Model Client Scripts | List of the model client scripts linked to this model. |
|
In SimpleOne you can create attribute mapping for models and collections. Data mapping is the process of connecting a data field from one table to a data field in another table. It reduces the potential for errors, helps standardize your data, and makes it easier to understand your data because it establishes direct relationships between your data across multiple tables at once.
To create an attribute, complete the steps below:
Attribute form fields
Field | Mandatory | Description | |||
---|---|---|---|---|---|
Container | Y | Reference to a previously created model. | |||
Attribute Type | Y | Specify the attribute type. | |||
Title | Y | Specify the attribute title. You can use Latin, Cyrillic letters, [0..9] numbers and the underscore symbol ( _ ). | |||
Attribute Name | Y | Attribute system name. This field is populated automatically. Latin letters, [0..9] numbers and the underscore symbol ( _ ) are allowed. | |||
Map to Column | N | Specify the target field to map the attribute value before the record is inserted (including business rules of the before type). This option allows you to quickly transfer attribute values to fields. The field is of the Reference type and has a reference qualifier, which allows for choosing columns of table defined in the model record and columns of its child tables.
The following message appears if there is no target column in the table:
| |||
Comments | N | Put some comments here describing your attribute. | |||
Active | N | Select the checkbox to make the attribute active or inactive. | |||
Read Only | N | Select the checkbox to make the field added with this attribute read-only. | |||
Mandatory | N | Select the checkbox to make the field added with this attribute mandatory. | |||
Type Specification tab | |||||
Dependent on Column | Y | Specify a column with reference to the Table (sys_db_table). The field appears when one of the following options is selected in the Attribute Type field:
| |||
Maximum Length | N | Specify a maximum value length for the attribute value. The value length cannot exceed the allowable length for the specified data type. The field appears when one of the following options is selected in the Attribute Type field:
| |||
Choice Table | N | Reference to a table. The field appears when the Choice option is selected in the Attribute Type field. | |||
Choice Field | Y | Reference to a particular column of the table specified in the Choice Table field. The field appears when the Choice Table field is populated. | |||
Choice Type | Y | Define whether the None option is applicable for the field. Available options:
If the Dropdown without --None-- is chosen, the Default value field becomes mandatory. The field appears when the Choice option is selected in the Attribute Type field. | |||
Extra Attributes | N | Specify additional configurations for the field. For example, enter the text below to apply radio buttons style to the choice field:
The field appears when one of the following options is selected in the Attribute Type field:
| |||
Reference | Y | Specify a table with the values you need. The field appears when the List or Reference option is selected in the Attribute Type field. | |||
On Delete | N | Select the action to take when the referenced record is deleted. Available options:
The field appears when the Reference option is selected in the Attribute Type field. | |||
Default Value tab | |||||
Default Value | N | Specify the 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 the checkbox if you want to generate the default value dynamically. | |||
Dynamic Default | Y | This field only appears when the Use Dynamic Default checkbox is selected. 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.
| |||
Reference Qualifier | |||||
Reference Qualifier Type | N | Specify the type of the reference qualifier. Available options:
The field appears when the List, Reference or Field Name option is selected in the Attribute Type field. | |||
Reference Qualifier Condition | N | Configure filters using the Condition Builder. The field appears when the Simple option is selected in the Reference Qualifier Type field. | |||
Dynamic Reference Qualifier | N | Select the dynamic reference qualifier from the list. The field appears when the Dynamic option is selected in the Reference Qualifier Type field. | |||
Reference Qualifier Fixed | N | Select the checkbox to fix filters in breadcrumbs. This functionality will block using the Condition Builder functionality. The field appears when one of the following options is selected in the Attribute Type field:
|
Attribute collections are implemented to user Many-to-Many Relationships, so they allow you to reuse the same attributes accross models instead of adding them separately to each model where necessary.
Simplified concept of use is:
After that, all the attributes contained in this collection are used by all models this collection relates to.
|
To create a collection, complete the steps below:
Collection form fields
Field | Mandatory | Description |
---|---|---|
Title | Y | Specify the collection title. |
Active | N | Select the checkbox to make the collection active or inactive. |
Table | N | Specify the table to which the collection is related. |
Related Lists | ||
Attributes | In this related list, you can create a new attribute related to this collection or select an existing one from the dictionary. | |
Form Elements | In this related list, you can create a new form element related to this collection or select an existing one from the dictionary. | |
Used in Model | In this related list, you can create a new model related to this collection or select an existing one from the dictionary. | |
Client Scripts | In this related list, you can create a new model client script related to this collection or select an existing one from the dictionary. |
|
To create a record extended model client script, complete the steps below:
Model Client Script form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Define the client script name. |
Container | Y | Reference to the model or collection. |
Type | Y | Specify the script type. Available options:
|
Attribute | N | Reference to a previously created model attribute. This field is mandatory when the onChange script type is chosen. |
Description | N | Client script description. |
Active | N | Select the checkbox to make the script active or inactive. |
Order | N | Specify client script execution order. Scripts are executed in ascending order. |
Script | N | Specify the client script. |
You can arrange the fields of your model attributes in a particular order and position, as you can do with form layouts. Group attributes by common features and give them a title. In the screenshot below, custom model attributes are divided into two columns:
If you want to define a title for a group of attributes organized in one block, use the Begin element. The title will appear on the relevant page of the Self-Service Portal. |
To change the order of the displayed attributes, perform the following steps:
Arrange the attributes by changing the value in the Position field.
Use inline editing: double-click on the cell in the Position column, enter the value and press Enter to save changes. |
To configure a model layout, perform the following steps:
Model Form Element form fields
Field | Mandatory | Description | |
---|---|---|---|
Container | Y | Reference to a previously created model. If the element is created from the related list, the field is populated automatically. | |
Position | Y | Define the order in which the element will be displayed on a form. | |
Block Element | Y | Specify the type of the splitter. Available options:
| |
Block Title | N | Define the title of the group of fields. The title will be displayed above the attributes group on the relevant page of the Self-Service Portal.
|