cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
vermaaman
Level: Powered On

Search for user using "JobTitle" and store in a list

Greetings,

 

I am trying to get the user using jobtitle "General manager" and want to assign the task in ms flow approval, i tried using formula like - Office365Users.SearchUser({searchTerm:"General Manager",top:500}), but it doesn't seem to be working.

 

Is there any way we can get the General manager and store in a sharepoint list?

 

Any help is highly appreciated.

 

Thank you!

 

4 REPLIES 4
shailendra74
Level 8

Re: Search for user using "JobTitle" and store in a list

Hi @vermaaman 

 

Check if this fits your requirement. Set the items property of Combobox1 to:

 

Filter(
    Office365Users.SearchUser(
        {
            searchTerm: ComboBox1.SearchText,
            top: 30
        }
    ),
    "General Manager" in Title  // use = for exact match
)

ComboBox1 SearchFields should be mapped to "DisplayName"

 

Thanks.

 

vermaaman
Level: Powered On

Re: Search for user using "JobTitle" and store in a list

hi @shailendra74 

 

thank you for the response on this, 

 

I am using dropdown control on the powerapps form, and applying below formula as you suggested

 

Filter(
          Office365Users.SearchUser(
           {
             searchTerm: "Manager",
              top: 10
          }
       ),
        JobTitle
)

 

doesn't seem to be working for me as of now.

 

can you please advise if i am doing anything wrong in there?

 

Please note that i am trying to populate users with "General manager" JobTitle in dropdown.

 

Thanks again.

shailendra74
Level 8

Re: Search for user using "JobTitle" and store in a list

Hi @vermaaman 

 

SearchTerm is the partial or full text you enter to search. In my example DisplayName.  Please check the Combobox Fields property.

 

The value is missing in your filter for JobTitle

vermaaman
Level: Powered On

Re: Search for user using "JobTitle" and store in a list

Hi @shailendra74 ,

 

Now i get it, 

 

Filter(
Office365Users.SearchUser(
{
searchTerm: "Peter"
}
),
"General Manager" in JobTitle
)

 

However we have to enter the name of the users, is it not possible populate all the users in dropdown first and then apply the filter? may be a silly question, please advise

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 184 members 5,501 guests
Please welcome our newest community members: