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 / If dropdown list = use...
Power Apps
Unanswered

If dropdown list = user location then select it

(0) ShareShare
ReportReport
Posted on by 17

Hi, 

 

I'm sure this is going to be rather easy but I am new to these apps.

 

I have a simple form that contains a lists of sites, the sites are populated from a sharepoint list.

StuDev_0-1669314348943.png

 

I have a line of code that gets the current logged on users Location from active directory.

 

Office365Users.MyProfileV2({'$select':""}).officeLocation

 

I would like to check is the users office location matches 1 of the sites in the dropdown list and if it does, select it when the form loads.

 

 

 

 

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @StuDev ,

     

    I assume the combo box's items property is :

     

    'SiteList'

     

    you could set the combo box's DefaultSelectedItems property to:

     

    LookUp('SiteList',LocationColumn=Office365Users.MyProfileV2({'$select':""}).officeLocation)

     

    I think this link will help you a lot:

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/controls/control-combo-box

    vbofengmsft_0-1669342925886.png

     

     

     

     

    Best Regards,

    Bof

  • StuDev Profile Picture
    17 on at

    Thank you mate.

     

    The site combo box is named badly (I used a form)

     

    I was'nt sure what to call: LocationColumn.

     

    StuDev_0-1669365785060.png

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @StuDev ,

     

    Could you please show me the combo box's items property.

     

    Best Regards,

    Bof

  • StuDev Profile Picture
    17 on at

    StuDev_0-1669372426727.png

     

  • StuDev Profile Picture
    17 on at

    Hi, is this the screen shot you mean?   Apologies - I am new to powerapps

     

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
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard