cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

PowerApps multiple checkbox items to a single SharePoint List Column

Hi All,

 

I have a SharePoint list with a Choice Column Usual Days, which will hold days of the week based on the user selection. I have created checkbox controls for each day on the PowerApp form and I like to push the selected checkbox values from the PowerApp form to the Usual Days column in the SharePoint list.

 

I tried to follow the blog below which I guess shows how to achive the above but haven't been successfull.  

https://powerapps.microsoft.com/en-us/blog/multivaluedchoicesinforms/ 

 

Please find attached the screenshot of the PowerApp form and error.

 

Really appreciate any help to achieve the above please.

 

 

Thanks

Jag

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @jsb81 ,

Do you enable "Allow Multiple selections" option for the Usual Days (Choice column) in your SP list?

 

Based on the error message that you mentioned, I think there is something wrong with the formula you typed within the Update property of the Usual Days Data card.

 

I assume that you have enabled "Allow Multiple selections" option for the Usual Days (Choice column) in your SP list, I have made a test on my side, please take a try with the following workaround:

The Usual Days column in my SP List as below:3.JPG

The App's configuration as below:4.JPG

 

5.JPG

Set the Update property of the Usual Days Data card within the Edit form to following:

ForAll(
       Split(Concatenate(
                        If(MondayCheckbox.Value, MondayCheckbox.Text & ",", ""),
                        If(TuesdayCheckbox.Value, TuesdayCheckbox.Text & ",", ""),
                        If(WednesdayCheckbox.Value, WednesdayCheckbox.Text & ",", ""),
                        If(ThursdayCheckbox.Value, ThursdayCheckbox.Text & ",", ""),
                        If(FridayCheckbox.Value, FridayCheckbox.Text & ",", ""),
                        If(SaturdayCheckbox.Value, SaturdayCheckbox.Text & ",", ""),
                        If(SundayCheckbox.Value, SundayCheckbox.Text, "")
               ),
               ","
        ),
        {Value: Result}
)

Set the Default property of the MondayCheckbox to following:

If(MondayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the TuesdayCheckbox to following:

If(TuesdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the WednesdayCheckbox to following:

If(WednesdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the ThursdayCheckbox to following:

If(ThursdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the FridayCheckbox to following:

If(FridayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the SaturdayCheckbox to following:

If(SaturdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the SundayCheckbox to following:

If(SundayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Please check the GIF screenshot for more details:Test.gif

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Dual Super User II
Dual Super User II

Hi @jsb81 , 

 

The error you are getting is because of incorrect update value of datacard, the DataCardValue420 control has been removed from the screen, so it is no longer be able to update the field of the form.
 
What you can do is:
 
When you have placed the checkbox for each day inside the datacard, please modify the onCheck property of all the checkboxes:
 
OnCheck: 
Monday: Set(SelectedDay,"Monday");Reset(Tuesday);Reset(Wednesday);Reset(Thursday);Reset(Friday);Reset(Saturday);Reset(Sunday)
Tuesday: Set(SelectedDay,"Tuesday");Reset(Monday);Reset(Wednesday);Reset(Thursday);Reset(Friday);Reset(Saturday);Reset(Sunday)
and this goes on for all the checkboxes.
 
Explanation: Setting the SelectedDay to specificDay and resetting all the other checkboxes. Here I have renamed my checkbox name to respective day.
 
Now the Update formula for the Data card:
Formula: {
    'Value': SelectedDay
}
MicrosoftTeams-image (57).png

 

MicrosoftTeams-image (58).png

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Community Support
Community Support

Hi @jsb81 ,

Do you enable "Allow Multiple selections" option for the Usual Days (Choice column) in your SP list?

 

Based on the error message that you mentioned, I think there is something wrong with the formula you typed within the Update property of the Usual Days Data card.

 

I assume that you have enabled "Allow Multiple selections" option for the Usual Days (Choice column) in your SP list, I have made a test on my side, please take a try with the following workaround:

The Usual Days column in my SP List as below:3.JPG

The App's configuration as below:4.JPG

 

5.JPG

Set the Update property of the Usual Days Data card within the Edit form to following:

ForAll(
       Split(Concatenate(
                        If(MondayCheckbox.Value, MondayCheckbox.Text & ",", ""),
                        If(TuesdayCheckbox.Value, TuesdayCheckbox.Text & ",", ""),
                        If(WednesdayCheckbox.Value, WednesdayCheckbox.Text & ",", ""),
                        If(ThursdayCheckbox.Value, ThursdayCheckbox.Text & ",", ""),
                        If(FridayCheckbox.Value, FridayCheckbox.Text & ",", ""),
                        If(SaturdayCheckbox.Value, SaturdayCheckbox.Text & ",", ""),
                        If(SundayCheckbox.Value, SundayCheckbox.Text, "")
               ),
               ","
        ),
        {Value: Result}
)

Set the Default property of the MondayCheckbox to following:

If(MondayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the TuesdayCheckbox to following:

If(TuesdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the WednesdayCheckbox to following:

If(WednesdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the ThursdayCheckbox to following:

If(ThursdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the FridayCheckbox to following:

If(FridayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the SaturdayCheckbox to following:

If(SaturdayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Set the Default property of the SundayCheckbox to following:

If(SundayCheckbox.Text in ThisItem.'Usual Days'.Value, true, false)

Please check the GIF screenshot for more details:Test.gif

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Kris,

 

The Usual Days column in the Sharepoint List is setup to allow multiple selection. 

So what do I do with DataCardValue1 which appears as a combo box on powerapp as in the attached screenshot.

 

Also I have added multiple forms on one screen and how do i submit all the forms including the checkbox value using a button please?

 

Thanks

Jag

 

 

 

Hi @jsb81 ,

Based on the needs that you mentioned, you should remove the DataCardValue1 (ComboBox) from the Usual Days Data card in your Edit form, instead, use the multiple Checkboxes control as selections.

 

If you want to submit multiple forms data to multiple data sources at the same time, please consider take a try with the following formula (set the OnSelect property of the "Submit" button):

SubmiForm(Form1);
SubmiForm(Form2);
SubmiForm(Form3);
...

If you want to submit multiple forms data into single one record in your data source, I think the Patch function could achieve your needs. Please take a try with the following workaround:

Set the OnSelect property of the "Submit" button to following:

Patch(
          'YourSPList',
           Defaults('YourSPList'),
           Form1.Updates,
           Form2.Updates,
           Form3.Updates,
           ...
)

Note: The Form1, Form2, Form3, ... represents the Edit forms within one screen of your app.

 

Based on the needs that you mentioned, I think the solution I provided above could achieve your needs. Please take a try with above solution, then check if the issue is solved. If you have solved your problem, please go ahead to click "Accept as Solution" to identify my solution as helpful.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @jsb81 ,

Have you solved your problem?

 

If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I get an error message as attached when I delete the combo box. Also how to I add the multiselect checkbox. I go to Controls and add a Checkbox for each day? 

 

I also tried adding a custom datacard and then adding individual check boxes but then I do not get the Update Property


Please note I'm building a data entry form using PowerApps to create new records in the SharePoint list ( Not Edit)

 

customdatacard.PNG

 

 

Thanks,

Jag

Hi @jsb81 ,

Please remove the formulas within the Y property of the ErrorMessage1 Label. In other words, set the Y property of the ErrorMessage1 Label to Blank.

 

In addition, currently within PowerApps, there is no way to add a multiselect checkbox within an app, we could only add Checkbox control individually. Based on the needs that you mentioned, we need to add one Checkbox control for each Usual day (Monday, Tuesday, ..., Sunday)

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey folks,

 

Reviving this thread. I've followed this methodology to save values back to my sharepoint list, which are in the multiselect column in the following format: value1, value2, value3

My issue is retrieving those values back into check boxes on a view/edit form. Initial entry took place on a New form, but now another team goes into edit or review. Thoughts on how to achieve this? Currently, I cannot get the app to retrieve and display the check boxes back into the app

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (20,314)