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 / Button DisplayMode to ...
Power Apps
Answered

Button DisplayMode to filter approvers

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

I have a strange but valid question from a user.

When my form is submitted, it triggers an email to Approver1, if Approver1 deletes the email, there is no way for them to get to the form for approval.

I have a button on my form, which is for 'my requests' and the DisplayMode I have set to this and when clicked navigates them to the my ViewScreen, I need this to be clickable for up to 5 users. is there a better way of doing this:

If(CountRows(Gallery2.AllItems)=0,DisplayMode.Disabled,DisplayMode.Edit)

  Ideally do not want the button to be cickable if the user logged in does not have anything to view in the ViewScreem which contains my gallery. I tried something like this and a few variation but doesn't work, can someone help please:

If(And(CountRows(Gallery2.AllItems Or VarUser=DataCardValue33.Selected.Email)=0,DisplayMode.Disabled,DisplayMode.Edit)

 

Categories:
I have the same question (0)
  • Verified answer
    eka24 Profile Picture
    20,925 on at

    Create a local Table on Onstart of the App:

    Set(MySelectedUsers,

        Table({MyUser: "g@sss.com"},

            {MyUser: "aaa@sss.com"},

            {MyUser: "bbb@sss.com"},

            {MyUser: "vv@sss.com"}))

     

    Then on the Displaymode of the button:

    If(User().Email in MySelectedUsers,DisplayMode.Edit,DisplayMode.Disabled)
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 

    Thank You.

     

    Edited my last comment, just re-testing

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @eka24 

     

    Thank you, I believe that works, will need to test it properly with another user, but not errors 🙂

     

    Curious if I can use what you have suggested on the Items property of my gallery, rather filtering by various users I tried this, but get a delegation warning on the in part of the function:

     

    Filter(List, VarUser in MyApprovers)

     

    It appears using exactin removed the delegation warning, I expect the users name will also be as is, so exactin being case sensitive should not cause me a problem:

    Filter(List, VarUser exactin MyApprovers)

     your thought please?

     

  • eka24 Profile Picture
    20,925 on at

    That will be fine provided the users will not have same names.

    Something should different the name. That is ok

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard