Submit Logic

From SmartWiki
Revision as of 14:17, 20 September 2007 by Julia Decker (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • This feature provides for the creation of any number of submission rules that control a level 1 submission process.
  • When a level 1 submission process is controlled by submission logic, then values at all levels can be validated.
  • Values are validated based on the sequence defined within the submission logic.
  • The submission rules can access any field aggregated at levels 2, or 3 , organisation fields, and fields at level 1.
  • The Submit Logic feature is associated with any level 1 status. Associating the conditions with each status allows for different statuses to control sets of Submit Logic rules.

Accessing the Submit Logic Function

To access the Submit Logic feature:

1. Click the Settings tab within the UTA.

2. Click any existing status link.

The Submit Logic tab is displayed next to the Status Trigger tab.

Logic.jpg

3. Click the Submit Logic tab.

Logic2.jpg

Each Condition consists of the following fields:

  • Order - the order in which the condition can be executed. Each condition is executed in sequence based on the order. The submission process will stop and the associated message displayed if the condition is not met.
  • Name - a narrative name for the condition.
  • Description - narrative description of the condition.
  • Condition - stores the expression that represents the condition.
  • Message - stores the message to be displayed in the condition is not met.

Condition Construction

Conditions consist of references to fields and aggregate functions and uses the same syntax as the Level 1 template. The following examples illustrate various examples of the submit logic:

1. Criteria: a minimum of three level 2 items (of any type) are required to submit the level 1 item.

@level2.count(*)@>2

2. Criteria: a minimum of three level 2 items where the type is email.

@level2.count(*):typename='email'@>2

3. Criteria: a minimum of three level 2 items where the type is email and the status is closed (for both items)

@level2.count(*):typename='email' and statusname='closed'@>2

Additional examples:

  • @company.commission rate@ > 0.3 - the commission rate for the associated company must be greater than 0.3 (30%).
  • @branch.name@ = 'xyz' - the associated branch name must be 'xyz'.
  • @total salaries@ < 400000 - the total salaries field in the Level 1 Entity is less than 400,000.
  • @level2.sum(megawatts)@ > 5 - the sum of the megawatts field in all level 2 is greater than 5.
  • @level2.sum(cf_23232)@ > 5 - same as previous example but using the custom field ID.

Message Construction

  • Messages are created for each condition providing the user with specific details as to the condition requirement that was not met.
  • Field names and aggregate functions are used in the same manner as with the condition construction.

Using the first condition example shown above:

At least three appendices are required to submit this proposal but only @level2.count(*)@ were found, please check and then submit the proposal again.