cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Search By JobTitle

Hello,

Does anyone have a solution for searching by JobTitle using either Sharepoint Person-type column or Office365Users connector?

Goal:

- Enter JobTitle keyword

- Return list of employees with keyword in JobTitle

Thanks!

20 REPLIES 20
BenFetters
Level 8

Re: Search By JobTitle

Hi,

 

I've never had to do that yet but I would maybe try something like this:

 

Have an text input control on the screen and where you can type the Keyword. Then try setting the "Items" property in the gallery to something like this: If(IsBlank(TextInput1.Text),Office365Users.SearchUser(),Filter(Office365Users.SearchUser(),TextInput1.Text = JobTitle))

 

I actually just tried it and it works! You could also use a similar formula with the same idea if you just wanted a simple combo box. I assumed you wanted a gallery.

 

Also, instead of putting in the "=" you could have "Contains" which would make the search a little better. Or you could try having a combobox with all the job titles available. 

 

Let me know if you have any questions,

Ben

BenFetters
Level 8

Re: Search By JobTitle

Actually, instead of "Contains" it would be "in". 

 

Kind regards,

Ben

seadude
Level 10

Re: Search By JobTitle

Can't wait to try this out tomorrow! Thanks @BenFetters, will report back.

Dawidvh
Level 10

Re: Search By JobTitle

Hi Eric,

 

How many users and groups in your tenant? If you don't pass any paremeters to the SearchUser api it will only return 100 users.

Filter(Office365Users.SearchUser(),JobTitle="Boss")

If you need more, you can pass the following to get 500 as a maximum.

Filter(Office365Users.SearchUser({searchTerm:"",top:500}),JobTitle="Boss")

If you have more than 500 user\groups, you would have to create multiple calls and write the answers to a collection.

 

Also consider writing the result into a collection and then display the collection in a gallery, instead of using the Office365Users connector directly in the gallery items.

 

Let me know if you don't come right.

 

twitter: @Dawidvh

youTube: https://www.youtube.com/channel/UCIMe_ErQZP5chbI9UyW0xLw

>>If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.<<

 

Super User
Super User

Re: Search By JobTitle

Hi @Dawidvh,

Is there a simple way to collect groups of 500 and append them to the same collection?

Super User
Super User

Re: Search By JobTitle

Hi @BenFetters,

I have > 500 AD entries so this method is not working as its written. I'm not exactly clear on how to collect > 500 AD records at a time.

Thoughts?

BenFetters
Level 8

Re: Search By JobTitle

I would maybe try going to File, App Settings, Advanced Settings, and then changing the row limit to 2000 I believe is the max. But if that doesn't work, I would try doing a ClearCollect on the OnVisible or OnStart on your home screen or another screen to collect all the users, then you could just filterthe collection of people based on what you typed in. 

 

Does that make sense? 

 

Also, the Org Browser app template could maybe give some other ideas.

Super User
Super User

Re: Search By JobTitle

Hi @BenFetters and @Dawidvh,

No go. Looks like the limit is 999 even with AppSettings/Max set to 2000

If you try "" or 0, it pulls a default of 100 records. I need more than 999.

Ideas?

image.png

 

image.png

BenFetters
Level 8

Re: Search By JobTitle

Maybe try taking a look at this video by Shane Young, if I remember right he solves this problem. 

Hopefully this helps! 

 

Shane Young Search User

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,531)