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 do I set up a Shar...
Power Apps
Answered

How do I set up a Sharepoint choice field in PowerApps with multivalues that successfully writes back to the SP list and can be updated

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have successfully set up a combobox in my one datacard which maps to a choice field in SP. the SP choice field is set to a single value as is the Combobox.

 

When I changed the SP field to allow multi values and the Combobox in Powerapps likewise, Something breaks.

 

What must I ensure is done so that it can write back to SP successfully on submitform() and can be edited successfully in the edit form thereafter?

 

Thanks for you help!

 

Regards,

 

Daniel 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    In your Update property for the datacard with your combobox, set the following formula:

    ForAll(
     yourdDataCardValueComboBoxName.SelectedItems,
     {Value: <valueColumnFromYourComboBox>}
    )

    Substitute in your combobox name in the formula and the column that contains the value (as per your Items property of the combobox).

     

    I hope this is helpful for you. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Randy,

     

    This is my formula but it's underlined in red under the last part- ThisItem.'Account Queries':

     

    ForAll(DataCardValue15.SelectedItems,{Value:<ThisItem.'Account Queries'>})

     

    I tried just 'Account Queries' but that also had a red line and I also tried what was written in the item property of the combobox: Choices([@'CRM Surveys'].AccountQueries).

     

    I'm sorry for being stupid. What am I not getting?

     

    Thanks again for your help.

     

    Regards,

     

    Daniel

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Here's the error in more detail:

    DanielRK_1-1613117022734.png

     

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    That is not the correct formula (I guess you figured that 😁 )

     

    Your Update property should be referring to the control in the DataCard - DataCardValue15

    You have part of that for your ForAll, but then you are referencing ThisItem..  That is a problem.  You should be referencing the value of the DataCardValue15.SelectedItems

    Since you are using Choices in your Items property, that tells me that you have a Value column in your DataCardValue15.SelectedItems

    So, your formula should be:

        DataCardValue15.SelectedItems

     

    The reason we no longer need the ForAll is because your Combobox is already based on Choices which has a Value column appropriate for the update to the data record.  So, we can just reference the SelectedItems as it will have the proper schema and information.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Randy,

     

    Thanks for your patience and explaining this to me. I'm starting to understand- it worked!

     

    However, what is the control or scenario where you would use the forAll formula you initially posted about?

     

    Thank you.

     

    Regards,

     

    Daniel

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    The ForAll would be used in a situation where you need a Table result that has a dissimilar schema than the Combobox.

    For example, if your Items property of a control is : Choices(somecolumn) then the items will be a table of Value columns.  This is valid for a Choice column update and you can simply use the combobox.SelectedItems property as it WILL be a table of Value columns (which is what you need to update the data column).

     

    If your control is based on something else (this is very common) like a lookup to another list.  Let's say - Filter(anotherList, someCriteria) or even just anotherList  Then you will have a table with many columns of the datasource and, most likely, no value column. 

    So, in the above, if we had, let's say, the Title column being selected and we wanted to write back the choices based on those titles, then we need to restructure the schema.  The easiest way is to simply do the following:

    ForAll(combobox.SelectedItems, {Value: Title})

    This would result in a table of value columns with the title in them...which is what a Choice column wants to have.

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

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard