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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Button visible accordi...
Power Apps
Answered

Button visible according to people columns

(0) ShareShare
ReportReport
Posted on by 367

Hi 

I have one people field, and I have one button on same form . my query is when I mention someone name in people picker . that particular button shouldn't show to that person . can we achieve that. And I have some condition already in that button already . if we can achieve this . how can I mention that . please help me . am new to power apps

 

Thank you 

Categories:
I have the same question (0)
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    Yes, it is possible to put additional conditions on the button to control the Visible or DisplayMode properties. How do you want the app to determine whether each person gets to see the button or not?

  • Yoursnani Profile Picture
    367 on at

    @BCLS776 

     

    Thank you for reply . please give me codes . how can I achieve .

     

    Thank you 

  • BCLS776 Profile Picture
    8,994 Moderator on at

    First, can you share how you want the app to decide whether a user gets to see the button or not? Some examples of criteria include:

    • Whether a user shows up on a defined SharePoint list
    • If a person is part of a certain Office 365 Group
    • The person's last name starts with the letter "M"
    • Depending on active or inactive status associated with this user from a data source
    • And lots more ways

    What do you want your app to do?

  • Yoursnani Profile Picture
    367 on at

    @BCLS776 

     

    I have SharePoint column name "project requestor". Its a people picker . 

    I select "jack" , that particular person not show that button ( jack con't see button ) . can you give me codes please

     

    Thank you

  • BCLS776 Profile Picture
    8,994 Moderator on at

    OK, create a variable in the OnVisible property of the screen:

    UpdateContext({varButtonVisible: true}) // Turns the button visible by default

     

    Use this new variable in the Visible property of the button:

    BCLS776_0-1623347845867.png

     

    Then edit the OnChange property of the combo box:

    If(
     First(ComboBox1.SelectedItems).DisplayName="jack",
     UpdateContext({varButtonVisible: true}),
     UpdateContext({varButtonVisible: false})
    )

     

    This will turn the button on and off according to the selection of "jack". Hope this helps!

  • Yoursnani Profile Picture
    367 on at

    @BCLS776 

     

    Thank you for responding . if I want to make button show only me . not all . how can I do that. 

  • BCLS776 Profile Picture
    8,994 Moderator on at

    In that case, I recommend defaulting the varButtonVisible as false and then replacing "jack" with your exact user display name. This will toggle the button to visible only if you are selected in the combo box.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard