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 / Default dropdown value...
Power Apps
Answered

Default dropdown value based on users organizational department

(0) ShareShare
ReportReport
Posted on by 32

Hello,

 

When adding data to a New Form, I would like to default the Dropdown for a users Department based on which department they belong to. I have added Office365Users.MyProfileV2().department.value and tried If(Office365Users.MyProfileV2().department = "Marketing", "Marketing", "Something Else")  to DefaultSelectedItems. But its not working.

 

Any ideas on how to default a dropdown based on Office365 connector?

Many thanks!

Categories:
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @SimonFamily, 😊

     

    Could the error be related to the DefaultSelectedItems property expecting a table value within the modern dropdown / classic combobox control? Would it be possible to try the following adjustment in which we type cast the text to a table value:

    [
     If(
     Office365Users.MyProfileV2().department = "Marketing", 
     "Marketing", 
     "Something Else"
     )
    ]

    Here we expect the Items property to be a single-column table (e.g. SP choices). Should this result in an error, we may need more information about the dropdown items property, datasource & the control type (modern or classic form, multi-select or single-select?).

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • SimonFamily Profile Picture
    32 on at

    This worked and defaulted correctly! Many thanks.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard