You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

https://home.simpleone.ru/record/sdlc_goal/159541824313375640

https://docs.google.com/spreadsheets/d/1dhiztB3hBmlEq2D1xFBrCE-tUGk9giKWgsmk6SSACAQ/edit#gid=614486133


Порой, при работе в рамках одной таблицы, для расширенного сбора и последующей обработки информации, могут использоваться иные атрибуты, так называемые "переменные". Один из случаев, когда можно использовать такую функциональность, это когда в рамках одной таблицы, для разных записей нужны разные наборы атрибутов, а использование расширения таблиц, путем наследования, технологически неприемлемо (из-за большого количества специфичных полей в большом количестве наследуемых таблицах), а также влечет за собой увеличение трудозатрат на управление множеством специфических полей в наследуемых таблицах. Тогда необходимо использовать атрибуты расширенной модели записи.


Переменная записи это как бы поле, выглядит как поле, ведет себя как поле, но полем, т.е. объектом sys_db_column не является. Т.е. в “переменной” для определенной записи и в пользовательском интерфейсе, и в API можно задать значение, прочитать значение, изменить значение. На события, связанные с переменной и с ее содержимым, можно наложить необходимую для автоматизации бизнес-процесса логику. "Переменные" являются атомарным звеном и объединяются в модели записи или в коллекции атрибутов, и представляют собой расширенную модель записи. Коллекции могут включаться в разные модели записи. Модель записи определяется при создании записи путем выбора или предопределенного значения. 

Для целевой записи с определенной моделью записи можно задать значения переменных в виде ассоциированных с этой записью специальных записей, хранящих эти значения.


To create a record extended model, please complete the steps below:

  1. Navigate to Record Extended Model → Models.
  2. Click New and fill in the fields.
  3. Click Save or Save and Exit to apply changes.

Record extended model form fields

FieldMandatoryDescription
NameYThe model name. 
TitleYThe model title. Can be specified in a language other than English.
DescriptionNThe model description. 
TableY

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.

ActiveNSelect this checkbox to make the model active or inactive.
IconNReduced image intended for the model identification.
After insert scriptNSpecify 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:

  1. Navigate to Record Extended Model → Attributes.
  2. Click New and fill in the fields.
  3. Click Save or Save and Exit to apply changes.

Attribute form fields

FieldMandatoryDescription
RE modelYReference to a previously created model.
Column typeYSpecify a column type 
TitleYAn 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:

  1. Navigate to Record Extended Model → Model Client Scripts.
  2. Click New and fill in the fields.
  3. Click Save or Save and Exit to apply changes.

Record extended model client script form fields

FieldDescription
NameClient script name. This field is mandatory.
RE modelReference to a previously created model. This field is mandatory.
Type

The script type:

  • onLoad – it starts when the system displays the form for the first time before users will enter data. Generally, onLoad scripts perform manipulations on the client-side with the current form or set default record values;
  • onChange – it starts when the specified field in the form is changed;
  • onSubmit – this client-side script can cancel form submitting by returning false;
  • onCellEdit - this client-side script starts at the moment when some cell is to edit.
    • oldvalue - the old value for the cell that was edited;
    • newValue - the new value for the cell that was edited;
    • table - the table name of the cell being edited (for example, sys_db_table); 
    • sysId - the ID of the record relevant to the cell being edited;
    • callback - if this variable is equated to FALSE, then subsequent scripts will not run; otherwise, they will execute.
RE attributeReference to a previously created model attribute. This field is mandatory.
DescriptionClient script description.
ActiveSelect this checkbox to make the script active or inactive.
OrderClient script execution order. Scripts are executed in ascending order.
ScriptSpecify a client script. Develop it using JavaScript extended by the SimpleOne Client-Side API methods.

  • No labels