Trying to add a filter to a gallery that displays all of my office365users with "Director" in their JobTitle. Using this formula, it only shows me 1 user:
gallery1:items>>Filter(Office365Users.SearchUser(),StartsWith(JobTitle,"Dir"))
if i use this formula: Filter(Office365Users.SearchUser(),"Director" in JobTitle) i get 3 users.
I know i have at least 10 directors so not sure why it is not displaying more...ideas??
I've increased data row limit to 2000.
Hi @jcollins,
The StartsWith function is used to test whether one text string begins with another. Based on the first formula that you provided, if there are two text strings -- "Director" and "Engineer Director" in JobTitle column, the "Director" could be detected, but the "Engineer Director" could not.
I have made a test based on the second formula that you provided, and don't have the issue that you mentioned. All users whose JobTitle property contains "Director" have been shown up within the Gallery control of my app. The screenshot as below:
Set the Items property of the Gallery control to following formula:
Filter(Office365Users.SearchUser(),"Director" in JobTitle)
In addition, please take a try to set the Items property of the Gallery control to following formula (Using Search function instead of Filter function😞
Search(Office365Users.SearchUser(),"Director","JobTitle")
Then check if the issue is solved on your side.
You could also consider take a try to remove the connection to the Office 365 Users connector within your app, then re-add a new connection to it within your app, then check if the issue is solved on your side.
More details about the Search function in PowerApps, please check the following aeticle:
Best regards,
Kris
Thank you @v-xida-msft .. i have tried all of your suggestions. Unfortunately none worked. I did, however, use the Azure Directory and this formula:
AzureAD.GetGroupMembers("ID").value
and chose my "Directors" group list id. It now shows all of my directors and since the AAD gets synced from my AD, it will be easy to update & maintain as time goes on. I wonder if my users will have any issues access the form though if they don't have access to AAD...hmm
I am now working on being able to click on a director name to select them and have that name fill in the field.
Sorry to bring up an old issue, but I'm having the same problem as the original user. Pretty much have the same, simple example:
Search(Office365Users.SearchUser(),"Facilities", "Department")
I also tried all the options (Filter, in, Search, etc.), and have the same results. I have 2 examples,
1) Department is "Facilties"
Here, I get 3 of the 4
2) Department is "IT Dept".
With IT Dept, I get 2 of the 4.
The only logic I can find in the results is that they are in alphabetical order (might be coincidence), but it appears to be the first results, not something specific. I copied/pasted the department name so there are no typos.
Any ideas?
Found the solution after submitting this ticket. For anyone running across this, it is due to limiting results to 100; therefore, the missing results are likely further down the list than 100. Adding a maximum results parameter (top:#) pushes further through the list and should find them all...
"Filter(Office365Users.SearchUser({searchTerm:"", top:999}), "Facilities" in Department)"
Note, according to the solution, the "top:" parameter limits at 999.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
182 | |
52 | |
41 | |
36 | |
30 |
User | Count |
---|---|
242 | |
82 | |
71 | |
69 | |
66 |