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 not picking ...
Power Apps
Answered

Combo box not picking up selected Items

(0) ShareShare
ReportReport
Posted on by 169

i'm a bit confused with the functionality of Combo box and how to retrieve items that have been selected.

 

i currently have set the "defaultselecteditemsproperty" on the combo box to a table using the code below. The strange thing is that the item is selected but is not highlighted, making me doubt that it is actually selected. And when i try to then grab the default selected items to patch to the data source it just overwrites what was there before with a blank.

 

Basically, my question is how to show comma separated values from a text field in a combo box as the selected values

 

OnStart

DefaultSelectedItemProperty

ForAll(Filter(col_DefaultGroupChecks, On=true), Title );

cb_control.png

 

OnVisible (i'm grabbing the values currently in SharePoint and storing them in a collection )

ClearCollect(col_DefaultGroupChecks, AddColumns(col_GroupChecks.Title, "On", Title in Split(global_selectedGames.GroupChecks,",")));

 

when Updating i just Patch

Patch(Datasource,

{'Group Checks':Concat(cb_scrUpdate_GroupChecks_1.SelectedItems.Title , Title & ",") }
)

Categories:
I have the same question (0)
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Gottijay2000,

     

    What is the items property of combo box? ( important ! )

    I have made a test on my side, and reproduce the issue you mentioned. Goes through a series of debugs, I found the issue (the default items is not really selected) is caused by ForAll expression.

    Combobox's default items must be derived from the items of combo box's data source, whereas ForAll expression returns a new table containing only the Title column, which is different from combo box's data source(Items property), so combo box does not actually select default items.

    The workaround : use lookup function to match the record of Combobox data source by Title.

     

    ForAll(Filter(col_DefaultGroupChecks, On=true), LookUp('CMB data source', Title =col_DefaultGroupChecks[@Title] ) );

     

    Please replace the 'CMB data source', also you can refer to my test demo.

    Snipaste_2019-11-04_17-36-00.png

    Snipaste_2019-11-04_17-37-30.png

    Hope this helps.

    Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

  • Gottijay2000 Profile Picture
    169 on at

    Hi @v-siky-msft ,

     

     i tried your work around and unfortunately i got an error using the lookuperror2.PNG

    The Item property of my ComboBox is 'Group Checks' which is a SharePoint list. the error message on Title says its an invalid argument type, so i created a new Title field in the collection with a different name to remove ambiguity hoping this would fix this. It got rid of the error but the items were still not selected

     

    OnVisible

    ClearCollect(col_DeafaultGroupChecks, AddColumns(col_DeafaultGroupChecks.Title, "On", Title in Split(global_selectedGames.GroupChecks, ","), "Title_2", Title     ));

    DefaultSelectedItems

    ForAll(Filter(col_DeafaultGroupChecks, On=true), LookUp('Group Checks', Title=Title_2) )

     

     

    Even with this change, i still have the same issues. Just looking at your demo again how have you gotten the collection 'sd' ?

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

    Hi @Gottijay2000 ,

     

     

    I have some questions:

    1. Could you describe more details with your SP list and columns? 

    2. What is the field shown in combo box? What is type of field? Text(single or multiple with comma) ? Choices?

    3. What is about 'global_selectedGames.GroupChecks'? The 'global_selectedGames' list and  'GroupChecks' column(multiple text separated by comma)? 

     

    I will reproduce my test steps , hope this can help you.

    1. I have a SP list  'Test 0910' within a Text column called 'Title' which is separated by comma

    Annotation 2019-11-05 100452.png

    2. split the Title of first rows by comma and save into collection:

     

    ClearCollect(AS,Split(First('Test 0910').Title,","))

     

    3. I create a collection which contains all single text, and set it to the items of combo box.

     

    ClearCollect(VV,["1","2","3","4","5"])

     

     4. After putting above formulas to OnVisible, set DefaultSelectedItems of combo box as below, and the default items would be selected

     

    ForAll(AS,LookUp(VV,Value= AS[@Result]))

     

     Annotation 2019-11-05 101416.png

    5. Patch the default items to SP list

     

    Patch('Test 0910',{Title:Concat( ComboBox1.SelectedItems.Value ,Value & ",")})

     

    Snipaste_2019-11-04_17-37-30.png

    Best regards,

    Sik

  • Gottijay2000 Profile Picture
    169 on at

    Hi Sik @v-siky-msft 

     

    i'm still not sure why its not working for me, i have practically followed your steps and still having issues.

    Steps

    i have a SharePoint list called Group Checks that holds all the items of the the combobox items property.

    1.

    Group Checks.PNG

    2. OnVisible

    i.) i store the values of the group checks list in collection and use in items property of combo box

    ClearCollect(col_GroupChecks,'Group Checks'.Title);

    ii. )i then get the values stored in SharePoint. (GroupChecks is a single line of text column, in a list called Games)
    Group Checks sp.PNG

    in PowerApps "global_selectedGames" holds the values of a specific record in the list games, so that if i want the current value of the groupchecks field i use "global_selectedGames.GroupChecks".

     

    ClearCollect(col_DefaultGroupChecks,Split(global_selectedGames.GroupChecks,","));

     

    DefaultSelectedItems

    i tried these two lines that didn't work 

     

    for the ForAll i got an error message. (expected an operand. the formula or expression expects a valid operand)

    ForAll(col_DefaultGroupChecks,LookUp(col_GroupChecks,Title=col_DefaultGroupChecks[@Result]))

     

    for the filter the values are showing but not highlighted like in your example
    Group Checks sp2.PNG

    Filter(col_GroupChecks,Title in col_DefaultGroupChecks.Result)

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

    Hi @Gottijay2000 ,

    for the ForAll i got an error message. (expected an operand. the formula or expression expects a valid operand)

    ForAll(col_DefaultGroupChecks,LookUp(col_GroupChecks,Title=col_DefaultGroupChecks[@Result]))


    This error information shows that ForAll function has some invalid operand, could you check if there are extra operators in the formula, e.g. ";".

    Another weird things is that I also follow your steps in a new app, and it still can work! (both ForAll and Filter Formulas)

    Annotation 2019-11-06 101607.png

    Could you also have a try in a new app?

    Best regards,

    Sik

  • Gottijay2000 Profile Picture
    169 on at

    Thanks Sik, that worked for me in a new app

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard