You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Next »
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 menu category.
REM concept
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:
- It is required to allocate more space for record storage.
- Scripts are executed slower.
- It is getting harder to configure the functionality related to the specified dictionary, such as data import, layout setting, etc.
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.
Configuring extension models
Generally, to configure your extension model, you need to:
- Create an extension model.
- Create attributes and link them to the model.
- (optional) Configure the attribute collection.
- (optional) Configure model client script.
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.
Creating models
To create a model, 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.
- Do not create or add an attribute to a model if an attribute with the same name already exists in this model.
- Do not rename an existing attribute if there is an attribute in the model with the name you want to enter.
Configuring attributes
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:
- Navigate to Record Extended Model → Attributes.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
Configuring attribute collections
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:
- Create a collection record as described below.
- Fill it with previously created attributes or create new ones using the Attributes related list.
- Relate this collection with previously created models using the Used in Models related list.
After that, all the attributes contained in this collection are used by all models this collection relates to.
- If you want to use attribute mapping in a collection, you need to specify a table in the Table field of a collection. Otherwise, leave the Table field empty.
- Collections with the populated Table field can only be added to models with the same table specified or to models of child tables.
To create a collection, complete the steps below:
- Navigate to Record Extended Model → Collections.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
- Do not rename an existing attribute in the collection if there is an attribute in the model or in the collection linked to the model with the name you want to enter.
- The same collection and model cannot be linked to each other more than once.
- Model and collection that have at least one eponymous attribute matching the model attribute cannot be bound between each other.
Configuring model client scripts
To create a record extended model client script, 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.
Configure model form elements
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:
- Navigate to Record Extended Model → Models.
- Open the model you need.
- Scroll down to the Related Lists area and open the Model Form Elements tab.
Arrange the attributes by changing the value in the Position field.
Use the 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:
- Navigate to Record Extended Model → Models.
- Open the model you need.
- Scroll down to the Related Lists area and open the Model Form Elements tab.
- Click New and fill in the fields.
- Click Save or Save and Exit to add the element.
- No labels