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 / Combo Box default valu...
Power Apps
Answered

Combo Box default value populated from SP list based on selected value of another Combo box

(0) ShareShare
ReportReport
Posted on by 235

Hi,

I'm struggling to get my default value of my Combo box (LocationComboBox) to load based on the selected value of another Combo box (CustComboBox). This is the setup:

  • In the first SP List ('CustomerList'), each item has both a customer reference ('CustRef') and an assigned location code ('AssignedLocationCode') which references the site of their booking - this is assigned by another system.
  • In the second SP list ('LocationList'), each item has both a location code ('LocationCode', which is the full listing of those codes that are that are assigned in the first list by the external system), and also further descriptions about that site - 'LocationName', 'LocationAddress' etc.
  • The user selects a value (single-selection only allowed) in CustComboBox from CustomerList. The default value is ThisItem.CustRef

The LocationComboBox shows a list of all place names (LocationName) from LocationList (single-selection only as well). I would like it's default value to be the LocationName stored in LocationList, based on the matching assigned site code of the CustRef selected in CustComboBox. 

So far I have (for LocationComboBox's default):

 

LookUp(LocationList,LocationCode=CustComboBox.Selected.AssignedLocationCode,LocationName)

 

It works in a text input field, but not sure how to make it work for a Combo box field.

Any help appreciated, thanks!

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @rhiheu :

    Do you want to set the LocationComboBox's default options based on the selection in CustComboBox?

    Do you want to display the options in LocationComboBox's as LocationName?

    The point is the combo boxs DefaultSelectedItems property.

    Ive made a test for your reference:

    Set the LocationComboBox's property to:

    Items: 

    LocationList

    DefaultSelectedItems:

    LookUp(LocationList,LocationCode=CustComboBox.Selected.AssignedLocationCode)
    DisplayFields: ["LocationName"]

    SearchFields: 

    ["LocationName"]

    I think this link will help you a lot:

    Combo box control in Power Apps

    Best Regards,

    Bof

  • rhiheu Profile Picture
    235 on at

    Hi Bof,

    I assumed with the 'DisplayFields' part you meant enter that under the separate DisplayFields property, not under DefaultSelectedItems, then it worked perfectly, thanks!!

    Thanks for the Combo box control in Power Apps link too. I had made the assumption that 'Default' was for single-selection only Combo boxes and 'DefaultSelectedItems' was for multi-selection Combo boxes. Do you know what is the purpose of the 'Default' field for Combo boxes? Just for my future reference. I've tried googling for an answer to this to no avail.

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 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard