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 values from two other combo boxes

(0) ShareShare
ReportReport
Posted on by 102

Hey everyone,

 

I'm having trouble setting the default value for a combo box that pulls from two other combo boxes.. 
This is what I have:

combo1.png

That works if there's only 1 of the combo box but i need to also pull the value from another combo box.

I tried doing:

DataCardValue2.SelectedItems.DisplayName & DataCardValue16.SelectedItems.DisplayName

but that doesn't work and doesn't make sense... 

anyone got an idea?

 

Thanks! 

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @MrEdward 

     

    Can you share more details about the logical implementation using the both comboboxes? "&" is used for concatenation. If you can share more details, we will be able to help you better.

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • MrEdward Profile Picture
    102 on at

    Hi @yashag2255 ,

     

    What I'm trying to do is have the default value of ComboBox1 based on the selection of ComboxBox2 and ComboBox3.

    For example:

    ComboBox2 selects David and John

    ComboBox3 selects Peter and Dawn

     

    ComboBox1's default value will be David, John, Peter, and Dawn.

     

    All these combo boxes are people/group field.

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @MrEdward 

     

    In that case, you can set the "DefaultSelectedItems" property of the first combobox to:

    Filter(["David","John","Peter","Dawn"],Or(Value in ComboBox3.SelectedItems.Value, Value in ComboBox4.SelectedItems.Value))

    Here, you need to replace ["David","John","Peter","Dawn"] with the value in Items property of the Combobox1 control.

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • MrEdward Profile Picture
    102 on at

    Humm that didn't work for me..

    Here's my code for ComboBox1 on Defaultselecteditems:

    Filter('Site Provisioning'.Owners, Or(DisplayName in DataCardValue2.SelectedItems.DisplayName, DisplayName in DataCardValue16.SelectedItems.DisplayName))

    Site Provisioning is a SharePoint List and ".Owners" is a Column on that list that is "People and Groups" type of column.

  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @MrEdward 

     

    The previous solution didn't work because it was designed for text type fields, for person or group type column, we will have to add a collection. Can you try to update the configuration to:

     

    DataCardValue2 & DataCardValue16 (Add this same formula to both controls)-> OnChange -> Clear(CombinedCollection);ForAll(DataCardValue2.SelectedItems,Collect(CombinedCollection,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims:"i:0#.f|membership|" & ThisRecord.Email,
    Department:"",
    DisplayName: ThisRecord.DisplayName,
    Email: ThisRecord.Email,
    JobTitle:"",
    Picture:""
    }));ForAll(DataCardValue16.SelectedItems,Collect(CombinedCollection,{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims:"i:0#.f|membership|" & ThisRecord.Email,
    Department:"",
    DisplayName: ThisRecord.DisplayName,
    Email: ThisRecord.Email,
    JobTitle:"",
    Picture:""
    }));Reset(ComboBox1)

     

    Combobox1 -> DefaultSelectedItems -> CombinedCollection

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • MrEdward Profile Picture
    102 on at

    Thanks @yashag2255 

    Didn't think of that method, works great!

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard