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 / How to select more tha...
Power Apps
Unanswered

How to select more than one item in a combobox based off the selection of another combobox?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a combobox with a DataCardValue called "DataCardValueProfile" in a form connected to a SharePoint list.  The combobox has a list of role profiles a user can choose from which populates other fields in the form to streamline the process of completing the form.  All of the fields populate fine except when I try to populate more than one item for a combobox. 

 

The following works for populating one item in a combobox(Also connected to the same SharePoint list) called "DataCardValueCallCenterGroup"  but not for multiple items. 

Works

DefaultSelectedItems:   If(DataCardValueProfile.SelectedValue="Marketing",{Value: "Marketing Call Center"}) 

 

Not working with two values - But doesn't show any errors

 If(DataCardValueProfile.SelectedValue="Marketing",{Value:["Marketing Call Center","Client Call Center"}]) 

 

Should I be doing this with a filter instead? 

 

Thanks!

 

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Disregard.  I misread what you are trying to do.

     

    You might need to do something like this:

     

    Concat(ComboBox1.SelectedItems, Title & ", ")

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

    @Anonymous

     

    What is the Items property of DataCardValueCallCenterGroup combo box? and what is the type of that column?

    If it is a choices column, please try this:

     

     If(DataCardValueProfile.Selected.Value="Marketing", Filter(Choices('SP list'.ColumnName),Value="Marketing Call Center" || Value="Client Call Center"))

     

    Sik

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The item property is Choices('SPList'.CallCenterGroup)

     

    I when I added the following to the Items property in DataCardValueCallCenterGroup it would only show the "Marketing Call Center" option to choose from and it wouldn't be selected like it is with the DefaultSelectedItems property.  

     

    If(DataCardValueProfile.Value="Marketing",Filter(Choices('SPList'.DataCardValueCallCenterGroup),Value="Marketing Call Center"||Value="Marketing Call Center"))


    I also tried changing || to && to see if the two options would show but it comes up as blank. 

     

    Thanks!

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

    @Anonymous 

    Which is the column name? which is the combo box name?

    In my understanding, 'CallCenterGroup' is the column name, and the 'DataCardValueCallCenterGroup' is combo box name, so please modify the formula as follows.

    Set DefaultSelectedItems property: 

     

    If(DataCardValueProfile.Selected. Value="Marketing",Filter(Choices('SPList'.CallCenterGroup),Value="Marketing Call Center"||Value="Client Call Center"))

     

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I tried that and the code doesn't have any errors but only selects one option like my code from the original post:

     

     If(DataCardValueProfile.SelectedValue="Marketing",{Value:["Marketing Call Center","Client Call Center"}]) 

     

    I'm wondering if this just isn't supported in the Combobox control. 

     

    Thanks!

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

    Hi @Anonymous 

     

    Can you try to update the formula to below expression and check if any of them suits:
     
    If(DataCardValueProfile.Selected.Value="Marketing",["Marketing Call Center","Client Call Center"])
     
    Filter(ItemsPassedinCombobox, If(DataCardValueProfile.Selected.Value="Marketing", Value in ["Marketing Call Center","Client Call Center"],false))
     
    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!
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It looks like I'm getting a red underline under "Value" for the filter:

    Filter(ItemsPassedinCombobox, If(DataCardValueProfile.Selected.Value="Marketing", Value in ["Marketing Call Center","Client Call Center"],false))

    It says that the name isn't valid and the identifier isn't recognized 

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

    Hi @Anonymous 

     

    .Value needs to be replaced with .ColumnName in the expression.

    I am assuming that column name is MyTestColumn, where you need to check "Marketing" as value, the expression should be:

    Filter(ItemsPassedinCombobox, If(DataCardValueProfile.Selected.MyTestColumn ="Marketing", MyTestColumn in ["Marketing Call Center","Client Call Center"],false))

     

    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!

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard