RuleValueType

A number of functions and rules in the Effector system are configured using the RuleValueType scheme.

Conform with the structure of the reference, the following expression will mean the node of any RuleValueType type rule:

/ (String)

The node's value contains the text of the rule, that depends on the type specified in the type attribute. The rule's text can contain references in every case. For more information on the rule's text, look for the description of the attribute.

Attributes

  • type - The type of the rule, which can be:
    • Constant: replaces the references in the rule only
    • Simple: the same as Constant complemented with simple conditions evaluated on the JavaScript engine.
  • SQL: the same as Constant, but it relies on the server for the calculation of the value, that runs the given SQL statement and returns its result. In this case, the text of the rule must be a valid SQL statement!

Note: In the absence of the attribute, the type = Simple is the default!

  • return - The value received after the evaluation of the rule should be converted to what type. Its value may be:

  • int - integer number
    • boolean - boolean
    • string - any text
    • datetime - date type
      • default - If there is an error occurring during the evaluation of the rule, this value shall be taken as the result.
  • message - Interpreted only for a handful of rules. When the result of the rule is a Boolean expression that can be interpreted as true, or an empty string, nothing happens. In any other case the system shows the message specified here.

References applicable in the rules' text

The references can be given in a [##<_group_>.<_field_>##] format. The field names that can be used for every group are discussed below:

  • Field - The value of one of the fields of the business object can be referenced here.

For example: [##Field.PeopleID##] means the `PeopleID field of the current business object.

  • Session: The data of the logged-in user can be accessed within the group. These are the following:
    • UserID (Integer) - The unique identifier of the user.
    • UserName (String) - The user`s unique login name.
    • CompanyID (Integer) - The unique identifier of the company assigned to the user.
    • CompanyName (String)- The name of the company assigned to the user.
    • ComputerName (String) - The name of the computer used for the login. (Note: not used!)
    • HostName (String) - The DNS name of the computer used for the login (Note: not used!)
    • Language (String) - The identifier of the active locale.
    • LongSessionID (Integer) - The user`s LoginSession identifier.
    • IsDeveloper (Boolean) - If the user has developer`s license.
    • IsExpress (Boolean) - If the user has Effector Studio Express license.
    • IsGuest (Boolean) - If the user is signed in with a guest account.
  • Special: : Other non-user specific constants. Possible field values are:
  • Today (DateTime) - The current timestamp (including date and time) formatted according to the current locale.
  • Date (DateTime) - The current date (without time) formatted according to the current locale.
    • Time (DateTime) - The current time formatted according to the current locale.
    • ObjectEditList (String) - If the ObjectEditList function is switched on in the DBConnectionXML_ then it contains a comma separated list with the name of the users who are currently editing.
  • ClickedButton (String) - The identifier of the clicked button in case of the rules whose evaluation is done after clicking a button.
  • Filter: The value of a given incoming filter.

For example: [##Filter.Project_ID##]

  • Triggered: Only used in workflow steps. The Field always contains the values of the BO where the workflow is coming from, while the Triggered contains the BO fields of the workflow to be created.

The most common RuleValueType type nodes are the following:

  • Visible: Visibility rule
  • Readonly: Read-only rule
  • Required: Requirement rule
  • WorkflowRequired: A requirement rule executed when the workflow step is set to “done”. The dialogue window must include the Task field as well (even if invisible!)
  • DefaultValue: A default value can be calculated with it.
  • SessionValue: The value assigned to the “Home” icon in the controls.
  • ComputedValue: The rule for the calculation of the field`s value.
  • ValidateRule: The rule for the examination of the validity of the field`s value.

Example:

<DefaultValue type="Constant" return="int" default="0">rule or value</DefaultValue>

  • Last update: 19 weeks 3 days ago
  • Effector