Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
https://home.simpleone.ru/record/sdlc_goal/159541824313375640
Порой, при работе в рамках одной таблицы, для расширенного сбора и последующей обработки информации, могут использоваться иные атрибуты, так называемые "переменные". Один из случаев, когда можно использовать такую функциональность, это когда в рамках одной таблицы, для разных записей нужны разные наборы атрибутов, а использование расширения таблиц, путем наследования, технологически неприемлемо (из-за большого количества специфичных полей в большом количестве наследуемых таблицах), а также влечет за собой увеличение трудозатрат на управление множеством специфических полей в наследуемых таблицах. Тогда необходимо использовать атрибуты расширенной модели записи.
Переменная записи это как бы поле, выглядит как поле, ведет себя как поле, но полем, т.е. объектом sys_db_column не является. Т.е. в “переменной” для определенной записи и в пользовательском интерфейсе, и в API можно задать значение, прочитать значение, изменить значение. На события, связанные с переменной и с ее содержимым, можно наложить необходимую для автоматизации бизнес-процесса логику. "Переменные" являются атомарным звеном и объединяются в модели записи или в коллекции атрибутов, и представляют собой расширенную модель записи. Коллекции могут включаться в разные модели записи. Модель записи определяется при создании записи путем выбора или предопределенного значения.
Для целевой записи с определенной моделью записи можно задать значения переменных в виде ассоциированных с этой записью специальных записей, хранящих эти значения.
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
Model client script
Model form element
Атрибут расширенной модели записи представляет собой элемент справочника атрибутов (запись в таблице sys_re_attribute, наследуемой от таблицы sys_db_column). Для атрибута расширенной модели записи определены следующие поля:
To create a record extended model 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.
Record extended model attribute 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. |
Column name | ||
Map to |
Field | Specify a target field to map the attribute value after the record is created. | |
Comments |
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.
Record extended model client script form fields
Field | Description |
---|---|
Name | Client script name. This field is mandatory. |
RE model | Reference to a previously created model. This field is mandatory. |
Type | The script type:
|
RE attribute | Reference to a previously created model attribute. This field is mandatory. |
Description | Client script description. |
Active | Select this checkbox to make the script active or inactive. |
Order | Client script execution order. Scripts are executed in ascending order. |
Script | Specify a client script. Develop it using JavaScript extended by the SimpleOne Client-Side API methods. |
Table of Contents | ||||
---|---|---|---|---|
|