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 / Set visibility on butt...
Power Apps
Unanswered

Set visibility on button for multiple user groups

(0) ShareShare
ReportReport
Posted on by 519

Hello,

I have a button on my form that I have targeted to a group of users that pulls from a SharePoint list.  The formula on the visible property for the button is:  If(IsBlank(LookUp('IIN Admins', Admins.DisplayName = varUser.FullName, Admins.DisplayName)),false,true) And currentTab="EditIIN"

 

This works really well and only users from the table/custom list  "IIN Admins" can see it.  I also have another table/custom list called "Operations Admins" with the same layout and field "Admins" as the IIN Admins list.  I wanted to include this operations table in the visible formula for the same button as I did not want to include those users in the IIN Admins list, since they have more permissions.  However, I can't seem to figure it out.  

 

I tried the following but it does not seem to work:  currentTab="EditIIN" AND (IsBlank(LookUp('IIN Admins', Admins.DisplayName = varUser.FullName, Admins.DisplayName)),false,true) Or If(IsBlank(LookUp('Operations Admins',Admins.DisplayName=varUser.FullName,Admins.DisplayName)),false,true)

 

Would appreciate some guidance on this.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @joshieboy 

    Please consider changing your Formula to the following:

    currentTab="EditIIN" &&
    (
     LookUp('IIN Admins', Admins.DisplayName = varUser.FullName, true) ||
     LookUp('Operations Admins',Admins.DisplayName=varUser.FullName, true)
    )

     

    I hope this is helpful for you.

  • joshieboy Profile Picture
    519 on at

    Hi @RandyHayes -- appreciate the prompt response on this.  The good news is that there is no longer an error on the button and it is now showing.  However, when I remove a user from the list they should not be able to see the button, and somehow the couple of users I tested it with they still see it.  Not sure what is missing. 

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @joshieboy 

    Make sure you have removed them from both lists and make sure you are refreshing your datasource in the designer when testing.

  • joshieboy Profile Picture
    519 on at

    @RandyHayes - thanks.  Forgot to mention that I also did that during the test.  There was an issue with this which I now recall. I believe I had to use varUserOffice365.Mail as the email address in SharePoint was showing firstname.lastname@domain.com whereas PowerApps was first letter of first name.lastname@domain.com.  So if I have to change the above to Name.Email=varUserOffice365.Mail how should that be included in the formula?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard