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 / Using ComboBox to stor...
Power Apps
Answered

Using ComboBox to store more than one Textvalue in Excelfield

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone.

 

I am currently building a application in which people can create and edit items stored in a Maintable of our company excelsheet.

 

Depending on the project it will have different "practice" meaning the expertise required. A project can have more than one "practice". Therefore, I thought I would use the ComboBox so that the person who inserts the information will be able to choose 0, 1 or more than 1 practices as can be seen below:

 

ComboBoxMoreThan1Value1.JPG

 

The problem is that it will only show the latest chosen in the DetailView and the excelsheets field:

 

ComboBoxMoreThan1Value2.JPG

 

My apologies if this is a basic question. Simply haven't found a way to do it.

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Bump
  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    If you want to store multiple values in Excel (or any data source which only supports single-valued columns), you can concatenate the values in a single string using a separator that do not appears in the strings. For example, if your options in the combo box don't contain commas, you can use this expression to convert the selected items from the combo box into a single string:

    Concat(ComboBox1.SelectedItems, Value, ",") // 'Value' may change depending on the Items property of the combo box

    And you can use a function such as Split to convert back from a single value into multiple values.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @CarlosFigueira , thank you for the answer!

     

    I am trying to use the Concat in the Items property of the Combobox, however it gives me an error saying "Invalid argument type (Table). Expecting a Text value instead

     

    ComboxPractice.Items"

     

    In the Items property it normally gets the information from the table "PracticeSPM" from my excelfile, how do I make sure it still connects? The Update property of the Practice also gives me an error as it is normally "ComboboxPractice.selected.value"

     

    EDIT:

     

    This is the code I used:

     

    Concat(ComboBoxPractice.SelectedItems, PracticeSPM, ",")
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Can anyone help? @CarlosFigueira @mdevaney 

     

    I do not understand why the Concat() function does not work.

     

    Am I supposed to put it in the Items property of the Combobox?

  • CarlosFigueira Profile Picture
    Microsoft Employee on at

    The Items property of the combo box should contain the possible values for the practice in your app. For example, this could be one example:

    ["Sales Operation", "Digital Transformation", "Operational Excellence", "Inc. Inovation"]

     If you are using this combo box inside a data card on a form, then the card's Default property should have the value from the Excel spreadsheet, so you would use this expression for the combo box DefaultSelectedItems property:

    RenameColumns(Split(Parent.Default, ","), "Result", "Value")

    This expression first splits the value from Excel in the multiple practices, then renames the resulting column so that the schema matches the one from the Items property (the function Split returns a table with a column called 'Result'; in the example above, my Items property has a column called 'Value').

    Finally, you would need to change the Update property of the data card that holds the combo box control so that it will use the information from that control when writing back to the Excel table:

    Concat(ComboBox1.SelectedItems, Value, ",")

    Again, in my example, the property from the Items collection is in a column named 'Value', but it may be different in your case.

    Hope this helps!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @CarlosFigueira 

     

    This did indeed help, thank you so much!

     

    Now my only hurdle is for the selected values (Parent.Default?) to stick when I go and edit the form again. With dropdown's I use the following:

     

    if(Editform1.mode = FormMode.edit, Parent.Default, " ")

     

    This gives me the following error with the Combobox:

     

    ComboBoxMoreThan1Value3.JPG

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

    Hi @Anonymous ,

    The reason why you met this problem is that " " represent text type. While combo box's DefaultSelectedItems should be records.

    You need to use formulas that all represent records to set combo box's DefaultSelectedItems.

    Please try to set the combo box's DefaultSelectedItems:

    If(Editform1.Mode = FormMode.edit, Parent.Default, {})

    {} represent a blank record.

     

     

    Best regards, 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yutliu-msft 

     

    Thanks for you response.

     

    For some reason it seems to asking for a Text value when I do that? I have tried "stack" the formula on top of the existing:

     

    ComboBoxMoreThan1Value5.JPGComboBoxMoreThan1Value4.JPG

     

     

    If I use the "" rather than {} I get an error under the ; - is that not what I am supposed to use when saying "and" essentially?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yutliu-msft @CarlosFigueira 

     

    Would you be able to help me? Being new I get stuck with this as I am not very comfortable with the syntax still. I have been googling around but nothing seems to work for me

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Bump

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 416 Most Valuable Professional

#2
11manish Profile Picture

11manish 205 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard