ObjectGears Help

           
Forum   ObjectGears (Version: 1.6.0.0)

Rules

Rules can be defined in a class or query. Rules enable formatting of displayed data, perform checks before display or saving data, send notifications etc.

Each rule has Event type, that says when something shall happen and Action type, which says, what shall happen.

You can define whatever number of rules and they will be evaluated in order according to the property Order. The value Order does not need to be unique. However, in such a case rules with the same order will be executed in a random order.

By means of property Enabled you can disable the rule temporarily.

Insert rule description in the property Functional description. If the description is in this field and not in the script itself, the processing will be accelerated.

Event type

Following table displays list of all the event types, to which you can respond in the model.

Name
Before new record detail display
Before existing record list display
Before new record saving
After new record saving
Before existing record saving
After existing record saving
Before record deletion

Action type

Name Description
Send notification Send notification depending on data in the particular record.
Start workflow Workflow can be started for new or updated record.
Set formatting You can set font and background colours, bold or italics for particular columns. You can also set background colour for the whole row.
Set or calculate value You can set formula for value calculation for each column.
Condition

It is used before saving and deleting the record, when the entered condition is evaluated. If it is not met, the record will not be saved/deleted and an error message is displayed.

By means of this rule you can easily add integrity checks of data entered by the user into class.

Start script In this rule you can add whatever extension by means of scripting. You can start a procedure, import, export, worflow etc.

You can use following objects in script:

 

Object Description When
OG Common object for scripts.  
OGActualDataRow Current data record (type DataRow).  
OGActualMessage Object for setting error message.  
OGOldDataRow Previous data record (type DataRow).

Before saving current record

After saving current record

OGDataParent Class object.  
OGSaveOption Object for controlling way of record saving.  

Rule Start script

It is possible to change all the columns of the class record in the rule, except for system columns (these are set by the system itself). Script is considered a secured part of the system and no restrictions for column update are applied to it.

You can solve also data initialization at creation of a new record in the script.

Before displaying new record in detail

You can define a default value for particular columns in this rule. 

You can define the default value as ID of the referenced record for the column type Value from a referenced class (however, this is not recommended due to portability to another instances) or as a text code enclosed in apostrophes. This code has to be in the referenced class in a text column with code code. There is upper and lower case distinguished in the value. If the ID or code do not exist in the referenced class, the settings are ignored.

Separate the values by comma in case of multiple references. If there are more values defined for a simple reference, the first one is used and the other are ignored.

Example:     'assigned'   'assigned,new,closed'

 

You can define the default value as a text code with code of the class enclosed in apostrophes for the column type Value from a referenced class (various casses). This code has to be in the referenced class in a text column with code code. There is upper and lower case distinguished in the value. If the ID or code do not exist in the referenced class, the settings are ignored..

Separate the values by comma in case of multiple references. If there are more values defined for a simple reference, the first one is used and the other are ignored.

Format:     'class_code:record_code'

Example:     'status:assigned'   'status:assigned,type:all'

Order of record initialization when displaying a new record on DataDetail.aspx

Display of a new record and its initialization can be influenced from several locations. Following overview displays order of calls:

  1. default values defined in columns
  2. values from a template - if it is used
  3. sequences in columns
  4. rules Set value and Script - they are processed according to the order defined in the rule
  5. script from class
  6. initialization via URL

It is not recommended to use all the possibilities at the same time - the solution would not be clear. Different options are suitable for different scenarios. Therefore, it is useful to think abot their use.

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information