Source: https://nishanth-fern-test.docs-staging.pageloop.ai/web/supported-operators-for-visibility-rules

# Supported Operators for Visibility and Display Rules

Note:

If you see the following UI, you have the New Visibility Rules enabled for the account. For more information, see [Understand New Visibility Rules](/web/understand-visibility-rules-20). ![Visibility Rules 2.0 screenshot](/images/d0/vr2_main-page-d07b7ff7.png)

Operators in Whatfix help determine whether a Visibility or Display rule condition is met according to a set value and thus show content based on it.

There are three types of operators supported by Whatfix:

- [Basic Supported Operators](/web/supported-operators-for-visibility-rules#basic-supported-operators)
- [Additional Supported Operators](/web/supported-operators-for-visibility-rules#additional-supported-operators)
- [Supported Operators for the Other Elements on Page rule](/web/supported-operators-for-visibility-rules#supported-operators-for-the-other-elements-on-page-rule)

### Basic Supported Operators

Some operators in Whatfix are supported by all the Visibility and Display rule conditions, except the **Other Elements on Page** rule. ![Visibility\_rule\_Additional\_operators.png](/images/03/Visibility_rule_Additional_operators-0327cb34.png)

The following are the operators:

| Operator     | Description                                                                          |
| ------------ | ------------------------------------------------------------------------------------ |
| Equals       | For an exact match                                                                   |
| Not Equals   | Doesn't equal the value                                                              |
| Contains     | The set value is present anywhere in the value of the condition (Check for strings). |
| Not Contains | The set value is not present anywhere in the value of the condition.                 |
| Starts With  | The set value is at the beginning of the value of the condition.                     |
| Ends With    | The set value is at the end of the value of the condition.                           |
| Exists       | The set value is available (or true).                                                |
| Not Exists   | The set value is not available (or false).                                           |

> [!INFO]
>
> Page and Role tags only support the **Exists** and **Not Exists** operators.

---

### Additional Supported Operators

Visibility and Display rule conditions like [Window Variable](/web/window-variable-condition-rule), [User Attribute](/web/attributes-condition-rules), and [Enterprise Attribute](/web/attributes-condition-rules) support some additional operators. ![Window\_variable\_Additional\_supported\_operators.png](/images/47/Window_variable_Additional_supported_operators-47fdda92.png)

The following are the operators:

| Operator          | Description                                              |
| ----------------- | -------------------------------------------------------- |
| Greater than      | The set value is greater than the value of the condition |
| Less than         | The set value is less than the value of the condition    |
| Date Greater than | Any day after the set date                               |
| Date Less than    | Any day before the set date                              |
| Completed         | Set User Action needs to be completed by the user        |

> [!WARNING]
>
> - **Greater Than** and **Less Than** accept only numerical values.
> - For **Date Greater Than/Less Than** in Window Variable, the default format is "MM/DD/YYYY". The format can be changed to match your system's date format. To change the format, contact [support@whatfix.com](mailto:support@whatfix.com?Subject=Change%20the%20date%20format%20of%20operators%20\&Body=Hello%20Team%2C%0A%0AI%20want%20to%20change%20the%20default%20date%20format%20%28MM/DD/YYYY%29%20for%20the%20Date%20Greater%20Than%20and%20Date%20Lesser%20Than%20operators%20present%20in%20Visibility%20and%20Display%20rules%20for%20my%20account.%20%0APlease%20provide%20assistance.%0A%0AThanks%20and%20Regards.).
> - For **Date Greater Than/Less Than** in User and Enterprise Attributes, the default format is the ISO date format. For example, 2001-08-19T17:38:56.235+0000, YYYY-MM-DDTHH:MM:SS.sss. The +0000 indicates the offset from UTC (Coordinated Universal Time).
>   - Date: August 19, 2001 (YYYY-MM-DD)
>   - Time: 17:38:56.235 (HH:MM:SS.sss)
>   - Time zone offset: +0000 (UTC)

> [!INFO]
>
> - User Action only supports the **Completed** operator.
> - **Completed** is not available for any other Visibility and Display rule. ![user\_action\_completed\_operator.png](/images/19/user_action_completed_operator-19035ea7.png)

---

### Supported Operators for the Other Elements on Page rule

The [Other Elements on Page rule](/web/other-element-is-condition-rule) has a list of operators different from the rest of the Visibility and Display rules. ![Visibility\_rule\_Other\_elements\_on\_page.png](/images/e8/Visibility_rule_Other_elements_on_page-e8559431.png)

The following are the operators:

| Operator                   | Description                                                                                |
| -------------------------- | ------------------------------------------------------------------------------------------ |
| Exists CSS Selector        | Set value is the CSS class or id of the element that exists in the application UI.         |
| Non Exists CSS Selector    | Set value is the CSS class or id of the element that does not exist in the application UI. |
| Exists JQuery Selector     | Set value is the jQuery selector of the element that exists in the application UI.         |
| Non Exists JQuery Selector | Set value is the jQuery selector of the element that does not exist in the application UI. |

> [!INFO]
>
> - jQuery CSS selector options always show in the UI, however, they are supported only for applications that have jQuery on the underlying platform.
> - For more information about how to find the CSS Selector for an element, see [How to find the CSS Selector of an element using Whatfix Studio?](/web/how-to-find-the-css-selector-of-an-element-using-whatfix-editor)

---

> [!WARNING]
>
> - If you create a Smart Tip inside iFrames, then the window variable must be pointed to the respective frame. You may use window\.frames.
> - If you are adding multiple conditions, then the tip is displayed only if all the conditions are true. (Similar to the Boolean AND)

## Related

- [Visibility and Display Rule Conditions](/web/visibility-and-display-rule-conditions-1)
- [Visibility Rules Best Practices](/web/visibility-rules-best-practices)
