Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 2Kmt8yt23aHwelTIk4VY9V
Power Apps - Building Power Apps
Answered

Get all selected items from combobox

Like (1) ShareShare
ReportReport
Posted on 4 Jun 2018 22:29:52 by 8

Hi guys,

 

im gettin crazy. i ve set up a combobox which uncludes the following items:

 

["1","2","3","4"]

 

i want to display the selected combobox items in a textlabel field (Text = combobox.Selected.Value).... but i only get the last selected combobox entry..... how do i get all of them ... ?

Categories:
  • MS-13051438-0 Profile Picture
    30 on 21 Jul 2023 at 18:43:06
    Re: Get all selected items from combobox

    Combo box Multi Select

    It is understood that if user selects multiple options in a Combo box, the selected values go and sit in a table. And according to my understanding, the table name is Combox.SelectedItems. Now, if you want to consider all of the selected values in a combo box, you can use a lookup function. 
    In my case, where I want to make some Text input components visible based on the Combo box selection, What I did is, 
    In the visible property of the text input component: If(!IsBlank(LookUp(ComboBox.SelectedItems, Value = "ItemfromCombobox")),true,false).
    With that I was able to multiple text inputs with multiple selection of Combo box. Give it a try and let me know. It worked for me. 

  • SSISJoost Profile Picture
    21 on 03 Jan 2021 at 21:18:17
    Re: Get all selected items from combobox

    Here is some example code to get the ID's of the selected items from a combobox into a label.
    PowerAppsCombo01

  • Community Power Platform Member Profile Picture
    on 25 Feb 2020 at 05:04:30
    Re: Get all selected items from combobox

    Thanks, it works for me.

  • Community Power Platform Member Profile Picture
    on 19 Jun 2019 at 11:32:55
    Re: Get all selected items from combobox

    Thanks for your solution. My combo box values when printed to Sharepoint end with a comma. IS there a way to stop this from happening? See below a screenshot of my SharePoint list. Thanks!

    Untitled1.png

  • MK1 Profile Picture
    169 on 24 Oct 2018 at 19:17:41
    Re: Get all selected items from combobox

    listbox default select

     

    @dinusc

    ComboBox with multi select

    ItemsDistinct(Filter(Product,Name.Id=Dropdown.Selected.ID),Title)

    ListBox

    Items: Distinct(Filter(product,Title in Listbox.SelectedItems),Description)

    Default:LookUp(Product,Title in listbox.SelectedItems.Result,Description)

    textInput: Concat(ADDescription.SelectedItems,Result&",")

     

    while using this scenario, Its working when there is only one item in the combobox and if we select it the description is selected default and added to the textbox

    But, when we select multiple items in the combobox, on description it shows both descriptions are selected but its only populating one description on top of the list.

    Can you help me with were i'm messing with the formula.

    Thanks in advance.

    MK

  • Community Power Platform Member Profile Picture
    on 24 Oct 2018 at 16:49:56
    Re: Get all selected items from combobox

    Thanks @dinusc

     

    Works a treat! Very much appreciated.

  • dinusc Profile Picture
    Microsoft Employee on 24 Oct 2018 at 16:46:02
    Re: Get all selected items from combobox

    Hello @Anonymous,

    I don't think you need to create any collections. Please try the following:

    1. Create a blank app and add 2 ComboBox controls.

    2. Set ComboBox2.Items property to the ComboBox1.SelectedItems.

    3. Select some items in ComboBox1. 

    4. Open the ComboBox2. You should see the selected items.

  • Community Power Platform Member Profile Picture
    on 24 Oct 2018 at 16:39:09
    Re: Get all selected items from combobox

    I have a combo box which has a list of items.

    I would like to populate another combo box based on the selections made in the first combo box.

     

    I think i need to create a collection from the 1st combo box and use this collection to create the items in the 2nd drop down box.

     

    I am struggling to collect the selections from the 1st combo.

     

    any ideas?

  • Verified answer
    dinusc Profile Picture
    Microsoft Employee on 02 Oct 2018 at 19:30:37
    Re: Get all selected items from combobox

    The field name dpeends on the data that you're trying to access. For example, imagine that you have "Accounts" table that has "AccountID", "Account Name" and "Company Name" fields. Now let's say that you want to allow the user to select the AccountID. In this case you set the ComboBox.Items = Accounts and then ComboBox.Selected.AccountID will be the value you're looking for. Alternatively, you could assign ComboBox.Items = Accounts.AccountID and in this case the ComboBox.Selected (not the .AccountID!) value will be the value you're looking for. This is why it is often hard to suggest the proper field name without knowing the underlying data structure.

    Please also note that In some cases, the field name is automatically assigned. This usually happens when the ComboBox.Items is set to a formula. In those cases the .Result is usually used. I hope this helps you find the proper field name to use in your applciation.

  • MK1 Profile Picture
    169 on 02 Oct 2018 at 19:04:09
    Re: Get all selected items from combobox

    hi @dinusc,

    I tried to use Combobox.selected.value. But its giving me error on the text box and not populating what ever i select on combo box.

    When i use combobox.selected.Result i was on,y able to get one value populated into thetext box.

    Any ideas to fix this would help.

    Thanks,

    MK

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,780 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard