Working with Calculations

  • Updated

In addition to fields and rules, calculations comprise the entity's data structure. Calculations are a special type of rule that are "always on". Whenever other fields, calculations, or rules that the calculation is dependent on change, the rule engine will recalculate the calculation rule's value.

Use calculations to create values that are the result of arithmetic operations, expressions, conditional statements, function calls, etc. InRule features a spreadsheet-like syntax for creating the logic, conditions, and expressions used for calculations and rules. Once created, your applications can leverage these potentially complex calculations by name for display or use within other processes.

Calculations are most appropriate when there is benefit to referencing a given expression in multiple places or when you want to define a value in output state via a single expression, and when the rule expression is relatively simple.

Adding a calculation

Right-click on the element to which you want to add to. Select Add -> Calculation


Deleting a calculation

There are a few ways to do this:

  1. Right-click on the calculation you wish to delete, and select Delete.
  2. Click on the calculation you wish to delete and click Delete on the Home Banner.
  3. Click on the calculation you wish to delete and hit the [Delete]

You will be prompted to confirm the deletion. Click Yes.




Specifies the name of the calculation.

Display Name

Specifies the name that will be used in the business language editor when referring to this field.

Data Type

Specifies the data type of the field. The available options are:

  • Text
  • Integer
  • Date
  • Datetime
  • Decimal
  • Boolean
  • Complex
  • Entity


Specifies the expression that will be evaluated when rule and calculations are run.

Clicking on the  mceclip1.pngbutton will display the Expression editor.

Clicking on the  mceclip2.pngbutton will switch between InRule syntax and business language syntax.


Clicking on the hyperlink will navigate to the Vocabulary folder for the entity in which this calculation is contained. Any calculation may have one or more classifications associated with it, such as a “Young” classification for an “Age” field meaning < 30 years.


Any calculation may have one or more Constraints associated with it, which will automatically be enforced for any data that is set for the calculation. When a Constraint is violated, InRule triggers a validation message containing information about the field and Constraint that is in violation. Clicking on the Constraint hyperlink will navigate to the Constraints for the entity in which this calculation is contained.

Related Topics

Working with Categories

Was this article helpful?

0 out of 0 found this helpful



Please sign in to leave a comment.