# Operators

Just as a sentence means nothing without a verb, anything you write in RuLa means nothing without operators. They make it possible for a variable to be defined, for a condition to work and for a rule to make sense.

The table below lists all available operators in alphabetical order, with a brief description. For a more extensive description of each individual operator, plus examples, click on it or visit the sub-pages in the menu on the left.

### Available Operators and Keywords

 Operator Category Description Boolean Compares. Evaluates to either true or false, delivering different outcomes. Boolean Compares, true for 'is not equal to'. Boolean Compares, true for 'greater than'. Boolean Compares, true for 'equal to or greater than'. Boolean Compares, true for 'less than'. Boolean Compares, true for 'equal to or less than'. Special Assignment, which can have any kind of expression on the right side of the operator. Mathematical Perform basic mathematical calculations. List Creates a new list from single values, allowing other list operators to perform actions on the new list. Date Takes a date and adds a specified number of years to it. Date Takes two dates, and checks if the first one comes after the second one. Date Takes two dates, and checks if the first one comes after, or is the same as, the second one. List Evaluates if all values in a list are true. Boolean Sets as condition that both expressions have to be true to have the entire expression evaluate to 'true'. Boolean Similar as above, but when using 'and then', the second question is only asked when the first evaluates to 'true'. Mathematical Calculates the average value. Known Calculates the average of available values. Date Takes two dates, and checks if the first one comes before the second one. Date Takes two dates, and checks if the first one comes before, or is the same as, the second one. String Accesses the calculated name of an instance. Mathematical Returns the value of the given parameter, rounded up to a whole number. String Combines two values into one new value, specifying what should separate the two. List Goes over a list, which is given on the left of the operator. Evaluates to 'true' if the single value on the right is present in the given list. List Expressions with this operator will only evaluate to 'true' if all values from the list on the right side are present in the list on the left side. List Going over a list, given on the left side of the operator, this operator has the expression evaluate to true if any value from that list is present in a list or the single value given on the right side. List Returns the number of occurrences of the given parameter. Special Makes sure a case contains at least, for example, 1 Person. (replaces `create`) List Returns the first element from a list. Mathematical Returns the value of the given parameter, rounded down to a whole number. Special Gives access to named properties of an instance using expressions. Special Returns specific information on an instance's properties. List Checks if a value is present in a taxonomy. Special Returns all instances of the given type(s) living on the platform. Special Basic assignment of a variable. String Combines a list of values into one new value by appending them. Known Sets a condition for when a property is not unknown. Known Builds a list of only the values that are available out of all the values it is given. List Performs the same action on each individual value in a list. Mathematical Returns the highest value. Known Returns the highest out of available values. Mathematical Returns the lowest value. Known Returns the lowest out of available values. Boolean A negation. List Evaluates to true if the given value is absent from the specified taxonomy. Date Current date and time. Special Sets a condition based on the type of ontology. `optional` Special The rule can accept, but will not require, for example, a third person. Boolean When just one of the two given expressions is true, the entire expression evaluates to 'true'. Boolean Similar to above, but the second question is only asked if the first has been answered. Special Sets a condition based on role(s). Mathematical Returns the value of the given parameter, rounded to a whole number. Special Refers to the current instance where you use it. Known Wrapping an expression with `SNEAKY`has the system ignore the expression, if the information used in it is not available. List Evaluates if any value in a list is true. Date Takes a date and subtracts a specified number of years to it. Mathematical Adds up numbers. Known Adds available numbers. Mathematical Multiplies values in one list with values on the same index in another list. Returns the sum of the multiplications. List Combines the elements of two sets into one single set. Known Creates a combined list of the available values and lists out of all values and lists you provide. Known Sets a condition for when a property is unknown. Date Calculates the number of years since a given date.

Last updated