Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How to save mutliple selection in combobox

(0) ShareShare
ReportReport
Posted on by 194

Hi All,

I have a combobox that allows for multiple selections. I have 2 methods using a Sharepoint list as my database:

 

Method 1: The combobox is hardcoded with options to select from in the app.

Method 2: The column on the Sharepoint list is a choice column and the with the choices on the sharepoint list and the app uses a combobox to again allow multiple selections.

 

 

My question is for each type (hard coded or using the choices column in sharepoint list), how do you use the update function for the form to save ALL the options selected?

 

Second question is when I create a view form to recall the information back, how do I use the form to display it? If its a read only combobox will it just list all the choices?

How is this handled for created new form with selections saved and recalling it back to view/edit.

 

Thank you so much!

Categories:
  • Nicci Profile Picture
    194 on at
    Re: How to save mutliple selection in combobox

    So I found just removing the datacard and readding it fixed it. Not sure what happened but it's working now :3

  • Nicci Profile Picture
    194 on at
    Re: How to save mutliple selection in combobox

    Sure so here is some more information.

     

    In sharepoint list i have a choices column called "Delivery Format" that allows multiple selections below, the setting 'allow multiple selections' is also turned on for this column as well.

    Nicci_0-1708952024495.png

     

    In my power app I created a form automatically which imported the datacard for this column. It is a drop down combobox with all my choices pulling from sharepoint, the combobox is called "DataCardValue6". I seem to have an error though for the default function for this combobox (but it came with the form, i didnt change it?) saying this:

    Nicci_1-1708952158349.png

     

    Anyways here is the update that again was auto imported/created when I created a new form pointing to the list:

    Nicci_2-1708952249232.png

     

    When I fill out the form including this combobox multi select field and select 2 items it causes a patch error, but if i dont select anything patch goes through, so even though the form auto imported for me based on the choice settings in sharepoint list its broken and doesnt add a new record in sharepoint if i use it.

     

  • Nicci Profile Picture
    194 on at
    Re: How to save mutliple selection in combobox

    Hello! So I'm working through what you wrong and I'm stuck on the update still.

    What should be the 'ChoiceColumn' in the code you put? When i type that in it causes an error, the form data card is already pointing to the column in the sharepoint list, typically i just put in the update field the combobox.selected.value but this is the first time I have to store all that is selected. 

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at
    Re: How to save mutliple selection in combobox

    Hi @Nicci,


    @Nicci wrote:

    Hi All,

    My question is for each type (hard coded or using the choices column in sharepoint list), how do you use the update function for the form to save ALL the options selected?


    Here is the thing, since you have this column Choice type, you should realize that whatever you hard code the ComboBox or using the Choice column in SP list(I mean Choices(list.ChoiceColumn)), you just refer to a Value column in your ComboBox, so once you save the selected Items to Choice column, the data format is the sam.

     

    Whatever hard code or using the Choice column in SP list like Choices(list.ChoiceColumn) , you need to save as below:

    {ChoiceColumn:ComboBox.SelectedItems}

    This is for the Update property of a data card including the ComboBox from a Form control.

     

     


    @Nicci wrote:

    Hi All,

    Second question is when I create a view form to recall the information back, how do I use the form to display it? If its a read only combobox will it just list all the choices?

    How is this handled for created new form with selections saved and recalling it back to view/edit.


    Make the DataSource property of the view form as your SP list name, set the Item property as a record you want to specify from the SP list like First(list_name) or maybe you have a Gallery and you could click a record to populate the viewform by Gallery.Selected.

    It does list all the Choices saved in your Choice column.

     

    To recall the form back to view/Edit after you submit a new form, you just need to add a Gallery listing all your records, set the OnSelect property of this Gallery as:

    EditForm(FormName);Navigate(FormName)

    Set the Item property of your form as:

    Gallery.Selected

     

  • WarrenBelz Profile Picture
    146,702 Most Valuable Professional on at
    Re: How to save mutliple selection in combobox

    Hi @Nicci ,

    Firstly, can you please post some details on your column and control names and types, your list name and any code you currently us (in Text) on the Items of the Combo Boxes as well as a bit more specific detail on what you want to do with each control.

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard