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 / Need to hide a field b...
Power Apps
Answered

Need to hide a field base on JobTitle

(0) ShareShare
ReportReport
Posted on by

I have a "RequestorJobTitle" text field that looks up the current user's Job Title using this formula:

First(Office365Users.SearchUser({searchTerm:txtRequestor.Selected.Email}).JobTitle)
 
This shows the users job title. Now I want to hide another field any time "RequestorJobTitle" contains the word "Manager", "Director", "Vice" or "Chief"
 
I've tried this:
If("Manager" in Office365Users.MyProfile().JobTitle, false, true Or If("Director" in Office365Users.MyProfile().JobTitle, false, true) Or If("Vice" in Office365Users.MyProfile().JobTitle, false, true) Or If("Chief" in Office365Users.MyProfile().JobTitle, false, true))
 
and:
 
If(Switch("Manager" in Office365Users.MyProfile().JobTitle, "Director" in Office365Users.MyProfile().JobTitle, "Vice" in Office365Users.MyProfile().JobTitle, "Chief" in Office365Users.MyProfile().JobTitle), false, true)
 
Which doesn't seem to work. What is the best way to do this?
Categories:
I have the same question (0)
  • Gochix Profile Picture
    1,935 Moderator on at

    @Jambou ,

     

    As you are mentioning that you want to hide another field if the RequestorJobTitle.Text contains specific word, then you don't have to filter through the Office365Users again, but rather the JobRequestorJobTitle.Text.

    If(!IsBlank(Find("Manager",RequestorJobTitle.Text)),false,true)


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @Jambou - in addition to the solution from @Gochix, apply the below to the Visible property:

     

    !Office365Users.MyProfile().JobTitle in [
     "Manager",
     "Director"
     "Vice",
     "Chief"
    ]

     

    Note the absence of the IF function. Given the Visible property only accepts a Boolean (true/false), there is no need to wrap an IF function around a formula which is already going to return a Boolean anyway.

  • Jambou Profile Picture
    on at

    Hi @Gochix ,

    I tried this and it works for "Manager" but how can I get it to work with the other values "Director", "Vice" and "Chief"?

     

    I tried this and it does't work:
    If(!IsBlank(Find("Manager",txtRequestorJobTitle.Text)),false,true Or !IsBlank(Find("Director",txtRequestorJobTitle.Text)),false,true Or !IsBlank(Find("Vice",txtRequestorJobTitle.Text)),false,true Or !IsBlank(Find("Chief",txtRequestorJobTitle.Text)),false,true)

  • Jambou Profile Picture
    on at

    Thank you @Amik ,

     

    I tried adding this to the Visible property and it's doesn't work.

    !Office365Users.MyProfile().JobTitle in [
        "Manager",
        "Director",
        "Vice",
        "Chief"
    ]
  • Verified answer
    Gochix Profile Picture
    1,935 Moderator on at

    @Jambou ,

     

    use: 

    If(
     Or(
     !IsBlank(Find("Manager", RequestorJobTitle.Text)),
     !IsBlank(Find("Director", RequestorJobTitle.Text)),
     !IsBlank(Find("Vice", RequestorJobTitle.Text)),
     !IsBlank(Find("Chief", RequestorJobTitle.Text))
     ),false,true)


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

  • Verified answer
    Jambou Profile Picture
    on at

    Thank you @Gochix.  This works perfectly!  Thank you so much.

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 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard