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 / Office Location in a d...
Power Apps
Answered

Office Location in a dropdown not filtered by user.

(0) ShareShare
ReportReport
Posted on by 57

We are looking to have a dropdown in our form where users can select the Office Location but it is not based on a user. We wanted to pull from the office 365 since that is updated regularly and we are not having to manually update the drop down all the time. Is there a way to just pull all the office locations for people to select from? 

Categories:
  • Michael E. Gernaey Profile Picture
    53,970 Super User 2026 Season 2 on at

    Hi @mcastine 

     

    Can you please restate what your need is, and the issue you are facing. Very simply.

     

    I don't know what this means.

    We are looking to have a dropdown in our form where users can select the Office Location but it is not based on a user

     

    • As it depends on what FILTERS or Search criteria you are putting in the Office365User query.

     

    Also dont know what this means

     Is there a way to just pull all the office locations for people to select from? 

    • You already said it was pulling them but its not based on user.


    Cheers
    If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

     

  • mcastine Profile Picture
    57 on at

    Thank you for responding. 

     

    We would like a drop down that is populated with just office locations from 365. For example, if this is the 365 User list:

    1. John Doe, Small city (Office Location)

    2. Mary Jane, Small city (Office Location)

    3. Bob Jones, Med city (Office Location)

    4. Larry Bell, Large city (Office Location)

     

    Then the drop down to choose from would say: 

    Small City

    Med City

    Large City

     

    I was able to do this:

    Distinct(Office365Users.SearchUser({searchTerm:"N"}).OfficeLocation, OfficeLocation)

     

    and it seems really close but if I take out the "N", I get a lot of empty rows. What can I put in there besides N that would help it work better? 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @mcastine,

    You got blank rows, which may mean that some user does not have officelocation, you could remove the duplicated blank rows to get all the officeLocation:

    Filter(Office365Users.SearchUser({searchTerm:"N"}),!IsBlank(OfficeLocation)).OfficeLocation

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard