# Operators

Just as a sentence means nothing without a verb, anything you write in [RuLa](https://docs.atfinity.io/rule-language/what-is-the-rule-language) 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Description                                                                                                                                                                                                |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`=`](https://docs.atfinity.io/rule-language/operators/boolean-operators/equal), [`!=`](https://docs.atfinity.io/rule-language/operators/boolean-operators/not-equal), [`<`](https://docs.atfinity.io/rule-language/operators/boolean-operators/less-than), [`<=`](https://docs.atfinity.io/rule-language/operators/boolean-operators/less-than-or-equal), [`>`](https://docs.atfinity.io/rule-language/operators/boolean-operators/greater-than), [`>=`](https://docs.atfinity.io/rule-language/operators/boolean-operators/greater-than-or-equal) | Perform basic comparisons. Evaluate to either true or false.                                                                                                                                               |
| [`:=`](https://docs.atfinity.io/rule-language/operators/special-operators/assign)                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Assignment, which can have any kind of expression on the right side of the operator.                                                                                                                       |
| [`+`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/+), [`-`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/+), [`/`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/+), [`*`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/+), [`%`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/+)                                                                                                                            | Perform basic mathematical calculations.                                                                                                                                                                   |
| [`[]`](https://docs.atfinity.io/rule-language/operators/list-operators/list)                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Creates a new list from single values, allowing other list operators to perform actions on the new list.                                                                                                   |
| [`[]`](https://docs.atfinity.io/rule-language/operators/list-operators/access)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Accesses an element of a list by its zero-based index.                                                                                                                                                     |
| [`{}`](https://docs.atfinity.io/rule-language/operators/dictionary-operators/create)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Creates a new dictionary from key-value pairs, allowing other dictionary operators to perform actions on the new dictionary.                                                                               |
| [`ADD_DAYS`](https://docs.atfinity.io/rule-language/operators/date-operators/add_days)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Takes a date and adds a specified number of days to it.                                                                                                                                                    |
| [`ADD_MONTHS`](https://docs.atfinity.io/rule-language/operators/date-operators/add_months)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Takes a date and adds a specified number of months to it.                                                                                                                                                  |
| [`ADD_WEEKDAYS`](https://docs.atfinity.io/rule-language/operators/date-operators/add_weekdays)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Takes a date and adds a specified number of weekdays (Mon–Fri), skipping weekends.                                                                                                                         |
| [`ADD_YEARS`](https://docs.atfinity.io/rule-language/operators/date-operators/add_years-3)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Takes a date and adds a specified number of years to it.                                                                                                                                                   |
| [`AFTER`](https://docs.atfinity.io/rule-language/operators/date-operators/after)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Takes two dates, and checks if the first one comes after the second one.                                                                                                                                   |
| [`AFTER_EQUAL`](https://docs.atfinity.io/rule-language/operators/date-operators/after_equal)                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Takes two dates, and checks if the first one comes after, or is the same as, the second one.                                                                                                               |
| [`ALL`](https://docs.atfinity.io/rule-language/operators/list-operators/all)                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Evaluates if all values in a list are true.                                                                                                                                                                |
| [`APPEND`](https://docs.atfinity.io/rule-language/operators/list-operators/append)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Returns a new list with a single element appended to the end. Does not mutate the original.                                                                                                                |
| [`and`](https://docs.atfinity.io/rule-language/operators/boolean-operators/and)                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Sets as condition that both expressions have to be true to have the entire expression evaluate to 'true'.                                                                                                  |
| [`and then`](https://docs.atfinity.io/rule-language/operators/boolean-operators/and-then)                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Similar as above, but when using 'and then', the second question is only asked when the first evaluates to 'true'.                                                                                         |
| [`ANY`](https://docs.atfinity.io/rule-language/operators/list-operators/any)                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Evaluates if at least one value in a list is true. Alias for `SOME`.                                                                                                                                       |
| [`AVG`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/avg)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Calculates the average value.                                                                                                                                                                              |
| [`AVG_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/avg_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Calculates the average of available values.                                                                                                                                                                |
| [`BEFORE`](https://docs.atfinity.io/rule-language/operators/date-operators/before)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Takes two dates, and checks if the first one comes before the second one.                                                                                                                                  |
| [`BEFORE_EQUAL`](https://docs.atfinity.io/rule-language/operators/date-operators/before_equal)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Takes two dates, and checks if the first one comes before, or is the same as, the second one.                                                                                                              |
| [`calculated_name`](https://docs.atfinity.io/rule-language/operators/string-operators/calculated_name)                                                                                                                                                                                                                                                                                                                                                                                                                                              | Accesses the calculated name of an instance.                                                                                                                                                               |
| [`CEIL`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/ceil)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Returns the value of the given parameter, rounded up to a whole number.                                                                                                                                    |
| [`CLAMP`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/clamp)                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Clamps a numeric value between a minimum and maximum.                                                                                                                                                      |
| [`COMB`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/comb)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Returns the number of ways to choose k items from n items (n choose k).                                                                                                                                    |
| [`CONCAT`](https://docs.atfinity.io/rule-language/operators/string-operators/concat)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Combines two values into one new value, specifying what should separate the two.                                                                                                                           |
| [`CONCAT_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/concat_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Like `CONCAT`, but only combines the values that are available (not unknown).                                                                                                                              |
| [`contains`](https://docs.atfinity.io/rule-language/operators/list-operators/contains)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | 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.                                                           |
| [`contains all`](https://docs.atfinity.io/rule-language/operators/list-operators/contains-only)                                                                                                                                                                                                                                                                                                                                                                                                                                                     | 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.                                                        |
| [`contains any`](https://docs.atfinity.io/rule-language/operators/list-operators/contains-any)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | 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. |
| [`COUNT`](https://docs.atfinity.io/rule-language/operators/list-operators/count)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Returns the number of occurrences of the given parameter.                                                                                                                                                  |
| [`CUSTOM_MAX`](https://docs.atfinity.io/rule-language/operators/list-operators/custom_max)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Returns the maximum element in a list as ranked by a second ordering list.                                                                                                                                 |
| [`DATE_EQUAL`](https://docs.atfinity.io/rule-language/operators/date-operators/date_equal)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Returns true if two dates refer to the same calendar date, ignoring time.                                                                                                                                  |
| [`DATETIME_EQUAL`](https://docs.atfinity.io/rule-language/operators/date-operators/datetime_equal)                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Returns true if two datetime values refer to the exact same point in time.                                                                                                                                 |
| [`DAYS_AGO`](https://docs.atfinity.io/rule-language/operators/date-operators/days_ago)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Returns the number of days since a given date.                                                                                                                                                             |
| [`DAYS_BETWEEN`](https://docs.atfinity.io/rule-language/operators/date-operators/days_between)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Returns the number of days between two dates.                                                                                                                                                              |
| [`DAYS_SPENT_IN_STATE`](https://docs.atfinity.io/rule-language/operators/date-operators/days_spent_in_state)                                                                                                                                                                                                                                                                                                                                                                                                                                        | Returns the number of days the current case has spent in a given state.                                                                                                                                    |
| [`ENDS_WITH`](https://docs.atfinity.io/rule-language/operators/string-operators/ends_with)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Returns true if a string ends with the given suffix.                                                                                                                                                       |
| [`ensure`](https://docs.atfinity.io/rule-language/operators/special-operators/ensure)                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Makes sure a case contains at least, for example, 1 Person. (replaces `create`)                                                                                                                            |
| [`filter()`](https://docs.atfinity.io/rule-language/operators/list-operators/filter)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Applies a conditional expression to a list, keeping only elements where the condition is true.                                                                                                             |
| [`FILTER`](https://docs.atfinity.io/rule-language/operators/list-operators/filter-1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Removes all occurrences of a specified value from a list.                                                                                                                                                  |
| [`FILTER_FALSE`](https://docs.atfinity.io/rule-language/operators/list-operators/filter_false)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Removes all `false` elements from the provided arguments.                                                                                                                                                  |
| [`FILTER_UNKNOWN`](https://docs.atfinity.io/rule-language/operators/list-operators/filter_unknown)                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Removes all `unknown` values from a list.                                                                                                                                                                  |
| [`FIRST_ELEMENT`](https://docs.atfinity.io/rule-language/operators/list-operators/first_element)                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Returns the first element from a list.                                                                                                                                                                     |
| [`FLATTEN`](https://docs.atfinity.io/rule-language/operators/list-operators/flatten)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Extracts values from a list of dictionaries by key, or concatenates a list of lists into a single list.                                                                                                    |
| [`FLOOR`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/floor)                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Returns the value of the given parameter, rounded down to a whole number.                                                                                                                                  |
| [`FORMAT_DATE`](https://docs.atfinity.io/rule-language/operators/date-operators/format_date)                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Formats a date as a human-readable string using a format pattern.                                                                                                                                          |
| [`FORMAT_DATETIME`](https://docs.atfinity.io/rule-language/operators/date-operators/format_datetime)                                                                                                                                                                                                                                                                                                                                                                                                                                                | Formats a datetime value as a human-readable string using a format pattern.                                                                                                                                |
| [`format`](https://docs.atfinity.io/rule-language/operators/string-operators/format)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Takes a string template and replaces named placeholders with provided values.                                                                                                                              |
| [`get_attr`](https://docs.atfinity.io/rule-language/operators/special-operators/get_attr)                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Gives access to named properties of an instance using expressions.                                                                                                                                         |
| [`GET_TRANSLATED_ATTR`](https://docs.atfinity.io/rule-language/operators/special-operators/get_translated_attr)                                                                                                                                                                                                                                                                                                                                                                                                                                     | Like `get_attr`, but returns the translated display value of the attribute.                                                                                                                                |
| [`get_properties`](https://docs.atfinity.io/rule-language/operators/special-operators/get-properties-from-instances)                                                                                                                                                                                                                                                                                                                                                                                                                                | Returns specific information on an instance's properties.                                                                                                                                                  |
| [`has_attr`](https://docs.atfinity.io/rule-language/operators/special-operators/has_attr)                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Returns true if an instance has a given attribute defined.                                                                                                                                                 |
| [`HOURS_BETWEEN`](https://docs.atfinity.io/rule-language/operators/date-operators/hours_between)                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Returns the number of hours between two datetime values.                                                                                                                                                   |
| [`HOURS_SPENT_IN_STATE`](https://docs.atfinity.io/rule-language/operators/date-operators/hours_spent_in_state)                                                                                                                                                                                                                                                                                                                                                                                                                                      | Returns the number of hours the current case has spent in a given state.                                                                                                                                   |
| [`in`](https://docs.atfinity.io/rule-language/operators/list-operators/in)                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Checks if a value is present in a taxonomy.                                                                                                                                                                |
| [`INDEX_OF`](https://docs.atfinity.io/rule-language/operators/list-operators/index_of)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Returns the index of the first occurrence of a value in a list or string. Returns -1 if not found.                                                                                                         |
| [`instances`](https://docs.atfinity.io/rule-language/operators/special-operators/instances)                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Returns all instances of the given type(s) living on the platform.                                                                                                                                         |
| [`instances_exist`](https://docs.atfinity.io/rule-language/operators/special-operators/instances_exist)                                                                                                                                                                                                                                                                                                                                                                                                                                             | Returns true if the case has at least one instance of the specified type(s).                                                                                                                               |
| [`IS_DATE`](https://docs.atfinity.io/rule-language/operators/date-operators/is_date)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Returns true if the given value can be parsed as a valid date or datetime.                                                                                                                                 |
| [`IS_WEEKDAY`](https://docs.atfinity.io/rule-language/operators/date-operators/is_weekday)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Returns true if the date falls on a Monday through Friday.                                                                                                                                                 |
| [`IS_WEEKEND`](https://docs.atfinity.io/rule-language/operators/date-operators/is_weekend)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Returns true if the date falls on a Saturday or Sunday.                                                                                                                                                    |
| [`is`](https://docs.atfinity.io/rule-language/operators/special-operators/is)                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Basic assignment of a variable.                                                                                                                                                                            |
| [`IS_UNIQUE_NAME`](https://docs.atfinity.io/rule-language/operators/special-operators/is_unique_name)                                                                                                                                                                                                                                                                                                                                                                                                                                               | Returns true if no active instance of the given type with that name exists.                                                                                                                                |
| [`JOIN`](https://docs.atfinity.io/rule-language/operators/string-operators/join)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Combines a list of values into one new value by appending them.                                                                                                                                            |
| [`JOIN_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/join_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Like `JOIN`, but only joins the values that are available (not unknown).                                                                                                                                   |
| [`known`](https://docs.atfinity.io/rule-language/operators/unknown-operators)                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Sets a condition for when a property is not unknown.                                                                                                                                                       |
| [`LAST_ELEMENT`](https://docs.atfinity.io/rule-language/operators/list-operators/last_element)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Returns the last element from a list.                                                                                                                                                                      |
| [`LEFT`](https://docs.atfinity.io/rule-language/operators/string-operators/left)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Returns the first n characters (or elements) from a string or list.                                                                                                                                        |
| [`LEN`](https://docs.atfinity.io/rule-language/operators/string-operators/len)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Returns the length of a string or list.                                                                                                                                                                    |
| [`LEVENSHTEIN`](https://docs.atfinity.io/rule-language/operators/string-operators/levenshtein)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Returns the number of single-character edits needed to transform one string into another.                                                                                                                  |
| [`LIST_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/list_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Builds a list of only the values that are available out of all the values it is given.                                                                                                                     |
| [`LOWER`](https://docs.atfinity.io/rule-language/operators/string-operators/lower)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Converts a string to lowercase.                                                                                                                                                                            |
| [`MAKE_FILENAME`](https://docs.atfinity.io/rule-language/operators/string-operators/make_filename)                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Converts a string into a safe filename.                                                                                                                                                                    |
| [`map()`](https://docs.atfinity.io/rule-language/operators/list-operators/map)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Performs the same action on each individual value in a list using method syntax.                                                                                                                           |
| [`MAP`](https://docs.atfinity.io/rule-language/operators/list-operators/map-1)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Performs the same action on each individual value in a list.                                                                                                                                               |
| [`MARKDOWN_TABLE`](https://docs.atfinity.io/rule-language/operators/string-operators/markdown_table)                                                                                                                                                                                                                                                                                                                                                                                                                                                | Renders a list of dictionaries as a Markdown table.                                                                                                                                                        |
| [`matches` (`=~`)](https://docs.atfinity.io/rule-language/operators/boolean-operators/matches)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Checks if a string matches a regular expression.                                                                                                                                                           |
| [`MAX`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/max)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Returns the highest value.                                                                                                                                                                                 |
| [`MAX_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/max_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Returns the highest out of available values.                                                                                                                                                               |
| [`MIN`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/min)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Returns the lowest value.                                                                                                                                                                                  |
| [`MIN_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/min_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Returns the lowest out of available values.                                                                                                                                                                |
| [`MONTHS_AGO`](https://docs.atfinity.io/rule-language/operators/date-operators/months_ago)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Returns the number of months since a given date.                                                                                                                                                           |
| [`NAME_AND_LOG`](https://docs.atfinity.io/rule-language/operators/special-operators/name_and_log)                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Evaluates an expression, logs its result under a name for debugging, and returns the result unchanged.                                                                                                     |
| [`not`](https://docs.atfinity.io/rule-language/operators/boolean-operators/not)                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | A negation.                                                                                                                                                                                                |
| [`not in`](https://docs.atfinity.io/rule-language/operators/list-operators/not-in)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Evaluates to true if the given value is absent from the specified taxonomy.                                                                                                                                |
| [`NOW`](https://docs.atfinity.io/rule-language/operators/date-operators/now)                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Current date and time.                                                                                                                                                                                     |
| [`ontology`](https://docs.atfinity.io/rule-language/operators/special-operators/ontology)                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Sets a condition based on the type of ontology.                                                                                                                                                            |
| [`or`](https://docs.atfinity.io/rule-language/operators/boolean-operators/or)                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | When just one of the two given expressions is true, the entire expression evaluates to 'true'.                                                                                                             |
| [`or else`](https://docs.atfinity.io/rule-language/operators/boolean-operators/or-else)                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Similar to above, but the second question is only asked if the first has been answered.                                                                                                                    |
| [`PAD_LEFT`](https://docs.atfinity.io/rule-language/operators/string-operators/pad_left)                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Pads a string on the left to the given width. Default fill is a space.                                                                                                                                     |
| [`PAD_RIGHT`](https://docs.atfinity.io/rule-language/operators/string-operators/pad_right)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Pads a string on the right to the given width. Default fill is a space.                                                                                                                                    |
| [`PICK_OR_DEFAULT`](https://docs.atfinity.io/rule-language/operators/special-operators/pick_or_default)                                                                                                                                                                                                                                                                                                                                                                                                                                             | Returns a value from an allowed list if it matches the input, otherwise returns a default.                                                                                                                 |
| [`PRETTY_PRINT`](https://docs.atfinity.io/rule-language/operators/special-operators/pretty_print)                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Formats a dictionary or list as an indented, human-readable JSON string.                                                                                                                                   |
| [`QUARTER_OF`](https://docs.atfinity.io/rule-language/operators/date-operators/quarter_of)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Returns the quarter (1–4) of the year for a given date.                                                                                                                                                    |
| [`REPLACE`](https://docs.atfinity.io/rule-language/operators/string-operators/replace)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Replaces all occurrences of a value in a string with another value.                                                                                                                                        |
| [`REPLACE_CHARS`](https://docs.atfinity.io/rule-language/operators/string-operators/replace_chars)                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Replaces characters in a string one-for-one using two equal-length character sequences.                                                                                                                    |
| [`REVERSE`](https://docs.atfinity.io/rule-language/operators/list-operators/reverse)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Reverses the order of elements in a list.                                                                                                                                                                  |
| [`RIGHT`](https://docs.atfinity.io/rule-language/operators/string-operators/right)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Returns the last n characters (or elements) from a string or list.                                                                                                                                         |
| [`roles`](https://docs.atfinity.io/rule-language/operators/special-operators/roles)                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Sets a condition based on role(s).                                                                                                                                                                         |
| [`ROUND`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/round)                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Returns the value of the given parameter, rounded to a whole number.                                                                                                                                       |
| [`self`](https://docs.atfinity.io/rule-language/operators/special-operators/self)                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Refers to the current [instance](https://docs.atfinity.io/guides/glossary/instance) where you use it.                                                                                                      |
| [`SET`](https://docs.atfinity.io/rule-language/operators/list-operators/set)                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Removes duplicates from a list.                                                                                                                                                                            |
| [`SET_DIFFERENCE`](https://docs.atfinity.io/rule-language/operators/list-operators/set_difference)                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Returns the elements in the first set that are not in the second set.                                                                                                                                      |
| [`INTERSECTION`](https://docs.atfinity.io/rule-language/operators/list-operators/intersection)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Returns the elements that appear in both lists.                                                                                                                                                            |
| [`SLICE`](https://docs.atfinity.io/rule-language/operators/string-operators/slice)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Returns a portion of a string or list between a start and end index.                                                                                                                                       |
| [`SNEAKY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/sneaky)                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Wrapping an expression with `SNEAKY` has the system ignore the expression, if the information used in it is not available.                                                                                 |
| [`SOME`](https://docs.atfinity.io/rule-language/operators/list-operators/some)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Evaluates if any value in a list is true.                                                                                                                                                                  |
| [`SORT`](https://docs.atfinity.io/rule-language/operators/list-operators/sort)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Sorts a list.                                                                                                                                                                                              |
| [`SPLIT`](https://docs.atfinity.io/rule-language/operators/string-operators/split)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Splits a string by a separator into a list. Optional max splits.                                                                                                                                           |
| [`SQRT`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/sqrt)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Returns the square root of a number.                                                                                                                                                                       |
| [`STARTS_WITH`](https://docs.atfinity.io/rule-language/operators/string-operators/starts_with)                                                                                                                                                                                                                                                                                                                                                                                                                                                      | Returns true if a string starts with the given prefix.                                                                                                                                                     |
| [`STRING_TO_JSON`](https://docs.atfinity.io/rule-language/operators/string-operators/string_to_json)                                                                                                                                                                                                                                                                                                                                                                                                                                                | Parses a JSON-encoded string and returns the corresponding dictionary or list.                                                                                                                             |
| [`SUBTRACT_YEARS`](https://docs.atfinity.io/rule-language/operators/date-operators/subtract_years)                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Takes a date and subtracts a specified number of years from it.                                                                                                                                            |
| [`SUM`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/sum)                                                                                                                                                                                                                                                                                                                                                                                                                                                                | Adds up numbers.                                                                                                                                                                                           |
| [`SUM_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/sum_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Adds available numbers.                                                                                                                                                                                    |
| [`SUM_PRODUCT`](https://docs.atfinity.io/rule-language/operators/mathematical-operators/sum_product)                                                                                                                                                                                                                                                                                                                                                                                                                                                | Multiplies values in one list with values on the same index in another list. Returns the sum of the multiplications.                                                                                       |
| [`TODAY`](https://docs.atfinity.io/rule-language/operators/date-operators/today)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | The current date.                                                                                                                                                                                          |
| [`Translate (.$)`](https://docs.atfinity.io/rule-language/operators/special-operators/translate)                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Accesses a taxonomy attribute in a way that its value is translated into the requested language at render time.                                                                                            |
| [`TRANSLATE_STRING`](https://docs.atfinity.io/rule-language/operators/string-operators/translate_string)                                                                                                                                                                                                                                                                                                                                                                                                                                            | Returns a translation marker for a custom string key, resolved at render time.                                                                                                                             |
| [`TRIM`](https://docs.atfinity.io/rule-language/operators/string-operators/trim)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Removes whitespace (or specified characters) from the beginning and end of a string.                                                                                                                       |
| [`TRIM_LEFT`](https://docs.atfinity.io/rule-language/operators/string-operators/trim_left)                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Removes whitespace (or specified characters) from the beginning of a string.                                                                                                                               |
| [`UNION`](https://docs.atfinity.io/rule-language/operators/list-operators/union)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Combines the elements of two sets into one single set.                                                                                                                                                     |
| [`UNION_OF_ANY`](https://docs.atfinity.io/rule-language/operators/unknown-operators/union_of_any)                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Creates a combined list of the available values and lists out of all values and lists you provide.                                                                                                         |
| [`unknown`](https://docs.atfinity.io/rule-language/operators/unknown-operators/unknown)                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Sets a condition for when a property is unknown.                                                                                                                                                           |
| [`UPPER`](https://docs.atfinity.io/rule-language/operators/string-operators/upper)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Converts a string to uppercase.                                                                                                                                                                            |
| [`UUID`](https://docs.atfinity.io/rule-language/operators/string-operators/uuid)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Generates a random UUID string.                                                                                                                                                                            |
| [`WEEKDAYS`](https://docs.atfinity.io/rule-language/operators/date-operators/weekdays)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Returns the number of weekdays (Mon–Fri) between two dates.                                                                                                                                                |
| [`YEARS_AGO`](https://docs.atfinity.io/rule-language/operators/date-operators/years-ago)                                                                                                                                                                                                                                                                                                                                                                                                                                                            | Calculates the number of years since a given date.                                                                                                                                                         |
