web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Visible property multi...
Power Apps
Answered

Visible property multiple conditions

(0) ShareShare
ReportReport
Posted on by 158

Hello, am I using the wrong not equal to type? I have some buttons that I grouped. On the visible property for the tab, I added a multiple string function. When I use it as an equal function, it works but when I change it to not equal it breaks. Hoping someone can look at my formula and tell me if I'm doing something wrong. 

 

Equal Formula

Lower(varUserEmail)=Lower("JohnDoe@bank.com") Or Lower(varUserEmail)=Lower ("JaneDoe@bank.com")Or Lower(varUserEmail)=Lower ("MyEmail@bank.com")

Not Equal Formula

Lower(varUserEmail)<>Lower("JohnDoe@bank.com") Or Lower(varUserEmail)<>Lower ("JaneDoe@bank.com")Or Lower(varUserEmail)<>Lower ("MyEmail@bank.com")

 

KhrystinaM_0-1714588985564.png

 

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    No, this makes sense, you are using OR 🙂

     

    so if any of your 'equal formula' are true, then the whole statement is true, like this:

    True or False or False = True

     

    but equally, for your 'not equal formula', since you are using 'or', if any of them are not true, then it would be visible

    // if this is not equal to that email then its true
    Lower(varUserEmail)<>Lower("JohnDoe@bank.com") 
    Or 
    // if its not equal to this other email then its true
    Lower(varUserEmail)<>Lower ("JaneDoe@bank.com")
    Or 
    // if its not equal to this third email then its true
    Lower(varUserEmail)<>Lower ("MyEmail@bank.com")

     

    So what that means, is that let's say that varUserEmail is "MyEmail@bank.com", looking at the first query, its true, as the email is not JohnDoe@bank.com so this would now be visible, and it would be true for the second query as its not equal to JaneDoe@bank.com and it would be false for the third item, as they Are equal. So you get

    True or True or False =  True

     

    If, I assume, you are checking to see if varUserEmail is equal to NONE of those, then you need to use the And operator between them, as it needs not match the first AND not match the second AND not match the third, like this:

    Lower(varUserEmail)<>Lower("JohnDoe@bank.com") And Lower(varUserEmail)<>Lower ("JaneDoe@bank.com") And Lower(varUserEmail)<>Lower ("MyEmail@bank.com")

    This would mean it would only be true if all three of those statements are true

     

    So let's use the example above where varUserEmail is "MyEmail@bank.com" in the negative logic above using the AND operator:

    True and True and False = False

     

    but if it was any other email than those three listed, like "bob@jane.com", then it would be:

    True and True and True = True

     

    Hope this helps a little bit, boolean logic can be tricky at times 😺

     

    Cheers,

    Sancho

  • KhrystinaM Profile Picture
    158 on at

    I want the buttons only visible to people within our SharePoint user group, but I need one button visible to an outside department. There are two users that we want to lock down the access but only one user will be logged in. Do I need to do an else function since one user will be false and the other is true? I'm going to test it now. 

  • KhrystinaM Profile Picture
    158 on at

    This did not work (or I wrote it wrong). 

  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Ok, this is slightly different from your original explanation, so let me tweak this slightly:

    //Group of true values, any of which makes it visible
    (
     //People within SharePoint User Group, must be visible if they match
     (
     Lower(varUserEmail)<>Lower("JohnDoe@bank.com") Or
     Lower(varUserEmail)<>Lower("JaneDoe@bank.com") Or
     Lower(varUserEmail)<>Lower("BobDoe@bank.com")
     )
     Or
     //People within outside department
     (
     Lower(varUserEmail)<>Lower("SomeoneExternal1@bank.com") Or
     Lower(varUserEmail)<>Lower("SomeoneExternal2@bank.com") Or
     Lower(varUserEmail)<>Lower("SomeoneExternal3@bank.com")
     )
    )
    And 
    // and in addition to the above, email address cannot be any of these two:
    Not(
     Lower(varUserEmail) = Lower ("LockedOutPerson1@bank.com") Or
     Lower(varUserEmail) = Lower ("LockedOutPerson2@bank.com")
    )

     

     

     

     

    Can I also suggest a different method?

     

    Create a SharePoint list called SecurityLevels.

    In it, create a row for each of those definitions, so you have row one where the Title is "YourInternalSharePointUserGroupName" (replace with your required name),

    and the other "YourOutsideDepartmentName" (replace with your required name),

    and the third "BlockedUsers" (or something similar)

     

    Then manage the access of each of those rows, and only grant read permissions to the users who are part of that department (or in the third case, the two users you want to block access). Make sure to remove modify and full owner rights from everyone except the account you are using to create the App.

     

    Then in your app, you add that list as a datasource, and you can simplify your formulas a lot by counting the number of rows where Title="YourInternalSharePointUserGroupName" or counting the number of rows where Title="YourOutsideDepartmentName" or counting the number of rows where Title="BlockedUsers" like this:

    (
     CountRows(Filter(Securitylevels, Title="YourInternalSharePointUserGroupName"))>0
     Or
     CountRows(Filter(Securitylevels, Title="YourOutsideDepartmentGroupName"))>0
    )
    And
    CountRows(Filter(Securitylevels, Title="BlockedUsers"))=0
    //The above line, if it does read the row that means they are a member of the blocked, then the whole statement will be false, so it won't be visible

     

  • KhrystinaM Profile Picture
    158 on at

    I ended up using part of your method (creating s security list) and using the set variable on start formula from this video. https://youtu.be/dIzOAbMjN7g?si=2zS_s1uIdEavOgvJ Thank you so much for your help!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard