- 24 Jan 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
Supported Operators for Visibility and Display Rules
- Updated On 24 Jan 2024
- 2 Minutes To Read
-
Print
-
DarkLight
-
PDF
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
- Additional Supported Operators
- 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.
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). |
Page and Role tags only support the Exists and Not Exists operators.
Additional Supported Operators
Visibility and Display rule conditions like Window Variable, User Attribute, and Enterprise Attribute support some additional operators.
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 |
- 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.
- 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)
- User Action only supports the Completed operator.
- Completed is not available for any other Visibility and Display rule.
Supported Operators for the Other Elements on Page rule
The Other Elements on Page rule has a list of operators different from the rest of the Visibility and Display rules.
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. |
- 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?
- 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)