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 / Control visibility in ...
Power Apps
Suggested Answer

Control visibility in Powerapps based on Filter

(2) ShareShare
ReportReport
Posted on by 603
I need to control the powerapps approve button visibility based on the below code. This code filters out all the users who are above certain jobTitle. 
 
My requirement is that approve button should only be visible to the users who are having the below job titles. May i know how to modify the below code in visible property of approve button?
 
Filter(
    mySolution,
    jobTitle = "Vice President" || jobTitle = "Senior Vice President" || jobTitle in "Director" || StartsWith(
        jobTitle,
        "Executive"
    ) || jobTitle = "Chief Executive Officer" || jobTitle = "Associate Director" || jobTitle = "Managing Director" || StartsWith(
        jobTitle,
        "CFO"
    ) || StartsWith(
        jobTitle,
        "Managing"
    )
)
 
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    try below in visible property in the button :
     
     
    !IsBlank(
        LookUp(
            mySolution,
            jobTitle = "Vice President" ||
            jobTitle = "Senior Vice President" ||
            jobTitle = "Director" ||
            jobTitle = "Associate Director" ||
            jobTitle = "Managing Director" ||
            jobTitle = "Chief Executive Officer" ||
            StartsWith(jobTitle,"Executive") ||
            StartsWith(jobTitle,"CFO") ||
            StartsWith(jobTitle,"Managing")
        )
    )
     
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Firstly @11manish's post may be correct here, but what you have not posted is what exactly is in mySolution.jobTitle and how this relates to the logged-in user (which is what you are wanting to test against) and where the Approve Button you want to control the visibility of is situated (in a Gallery, in a Form, or on the screen).
    I am assuming a few things here, but if you put this on the Visible of the button, it will only show for users with the required jobs
    With(
       {_Job: Office365Users.UserProfileV2(User().EntraObjectId).jobTitle},
       _Job in  
       [
          "Vice President", 
          "Senior Vice President", 
          "Chief Executive Officer", 
          "Associate Director", 
          "Managing Director"
       ] ||
       "Executive" in _Job ||
       "CFO" in _Job
    )
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard