Top
Group Visibility Rules using And and OR conditions
  • 09 Feb 2024
  • 1 Minute To Read
  • Dark
    Light
  • PDF

Group Visibility Rules using And and OR conditions

  • Dark
    Light
  • PDF

Article Summary

While adding Visibility Rules, you can use the And and Or conditions to determine when certain widgets or content should be displayed. You can also use both these conditions together as a combination for fine-tuned control over when certain elements are displayed or actions are taken.

And Condition

All conditions connected by And must be true for the overall condition to be true.
For example, if you have an application with different pages, and you want to display a widget only on the Home page when the user is logged in. You can use the And condition to combine the specific Visibility Rules and the widget will be displayed if and only if both conditions, Page is Home and User is Logged in, are true simultaneously.

visibility rule_and condition.png

Here are all the scenarios where the And condition works,

Visibility Rule 1 Visibility Rule 2 Will content display?
True True Yes
True False No
False True No
False False No

Or Condition

If any of the conditions connected by Or is true, the overall condition is true.
For example, if you might want to display a feature announcemnt Pop-up to users who either have Account Manager or Content Manager role. You can use the Or condition to combine the specific Visibility Rules and the Pop-up will be displayed if either one of the conditions are met.

visibility rule_or condition.png

Here are all the scenarios where the Or condition works,

Visibility Rule 1 Visibility Rule 2 Will content display?
True True Yes
True False Yes
False True Yes
False False No

Combination of And and Or Conditions

When using both And and Or operators simultaneously, the Or operator functions between groups of conditions joined by And. This arrangement allows for a more nuanced control over the visibility rules, enabling complex conditions to be constructed.

For example, you want to display a promotional banner only on the Home page for users who are either logged in and have the Account Manager role or are logged out but have previously visited the site. This can be achieved by combining And and Or operators in the Visibility Rules.

In this scenario, the And operator will first evaluate the conditions within each group, ensuring that all conditions within a group must be true. Then, the Or operator will evaluate whether any group of conditions meets the criterion for visibility.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.