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 / DefaultSelectedItems f...
Power Apps
Answered

DefaultSelectedItems for a ComboBox not behaving as expected

(0) ShareShare
ReportReport
Posted on by 90

Hello all.

So I have a screen on an app that looks like this:

jojos_iq_0-1678241456121.png

The problem I am having is that the AssigneeTriggerColumn (which is a choice column in a SharePoint list called Hazards) is not auto-filling with options. How it works is:

  • If the Second Assignee dropdown is empty, set the AssigneeTriggerColumn choice to "NewAssignee"
  • If the Current Assignee dropdown is empty, set the AssigneeTriggerColumn choice to "SecondAssignee"
  • Else, set the AssigneeTriggerColumn choice to "NewPlusOne"
  • Both Assignee dropdowns are People and Group columns from the same SharePoint list called Hazards

When I load into the page, the value is immediately on "AssigneeTriggerColumn" is set as NewPlusOne, which is expected behaviour. However when I populate either the CurrentAssignee or SecondAssignee boxes, the AssigneeTriggerColumn dropdown doesn't change. It only changes when the value is removed from the column - the AssigneeTriggerColumn starts auto-filling as expected. I just want to know why it starts working properly, but only after I remove the values?!?! Below is my code:

 

//Auto-fill with a choice, dependant on what boxes have values
If(IsEmpty(SecondAssigneeBox.SelectedItems), LookUp(Choices(Hazards.AssigneeTriggerColumn),Value="NewAssignee"), If(IsEmpty(CurrentAssigneeBox.SelectedItems), LookUp(Choices(Hazards.AssigneeTriggerColumn),Value="SecondAssignee"), LookUp(Choices(Hazards.AssigneeTriggerColumn),Value="NewPlusOne")))

 

 

Please help! Thank you 😊 - also, feel free to ask me any questions about the app if you need any clarification on anything!

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @jojos_iq,

    Could you please tell me that if both ComboBox allow multi select or not?

     

    If sometimes you only select one item, the following formula could work:

    If(IsBlank(SecondAssigneeBox.Selected),{Value:"NewAssignee"},IsBlank(CurrentAssigneeBox.Selected),{Value:"SecondAssignee"},{Value:"NewPlusOne"})
  • jojos_iq Profile Picture
    90 on at

    The ComboBox does not allow multiselect and I have tried your code - it worked!

    My day has only just started, but you have just made it 😊 - thank you so much! Could I ask you what the value part of the formula refers to? I don't really understand everything between the curly braces.

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

    Hi @jojos_iq,

    The Value part is a paticular format of the Choice column to set the DefaultSelectedItems property of the ComboBox.

    Generally, we will format as below:

    {Value:Specific_Value_Form_Choice_Field}

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 545 Most Valuable Professional

#2
Haque Profile Picture

Haque 314

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard