Announcements
I have a form with a field for submitter that uses o365 to prefill user name. I have another field that is a combobox tied to a SP people picker column. I would like to filter the second field to show only people in the same department as the submitter. How do I do that with filtering and office365 search user? Below is what I have and it isn't returning correct choices.
Filter(Office365Users.SearchUserV2({Top: 500}).value,OfficeLocation = Label40.Text)
@ahhollan you say it does not return the correct choices...so what does it return? What is in Label40?
I've altered my formula to use Office365 values to filter against officelocation. However, i get the Expected Record value error.
Filter(Office365Users.SearchUserV2({Top: 500}).value,OfficeLocation = Office365Users.MyProfile().OfficeLocation)
Hi @ahhollan ,
Your formula is correct, however, I think you have set this formula in wrong place. It should be located in the Items property of the Combo box/Dropdown.
Best regards,
In short, 'Search User' will search the first 100 records in your Active Directory (you can extend the result set to look for up the first 999 records but that's it). The alternative is the SearchTerm option however SearchTerm will only look at certain AD columns (display name, given name, surname, mail, mail nickname, and user principal name) so no location.
If you have Azure AD groups per office location you could use the AzureAD connector instead? 'Get Group Members' - so potentially if your groups had specific location names eg SydneyUsers - you could get that group, pull into a collection and present them?
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 345 Super User 2026 Season 2
M Bilal Khan 312
Mohsin Ali 252