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 / Checkbox values are no...
Power Apps
Answered

Checkbox values are not saved when editing the item

(0) ShareShare
ReportReport
Posted on by 119
I am having problems when editing the information of my form and is that when I edit the item the values of my checkbox are not saved.

I have a Sharepoint list with a column of type Choice and with the option to allow multiple selections, these values I am representing in my PowerApps form with checkbox in total are nine values.

To register in the item the values of each of the checkboxes for the first time I have added to the OnCheck property a collection and validations with each of the values as follows:

ClearCollect(Pictogram;If(Checkbox1.Value;"Example value 1");

If(Checkbox2.Value;"Example value 2");

If(Checkbox8.Value;"Example value 3");

If(Checkbox9.Value;"Example value 4");

If(Checkbox10.Value;"Example value 5");

If(Checkbox11.Value;"Example value 6");

If(Checkbox12.Value;"Example value 7");

If(Checkbox13.Value;"Example value 8");

If(Checkbox14.Value;"Example value 9"));;

ClearCollect(Pictogram;Filter(Pictogram;!IsBlank(Value)))
 
I've also liked the same for the OnUncheck property.

In the DataCard that contains the different checkboxes in the Update property I liked the collection that I added earlier called "Pictogram", the same DataCard in the Default property I have added ThisItem.Pictogram.

At the time of saving the information for the first time it is successfully registered.

The error I am presenting at the time of wanting to edit the item, before editing the item I am showing the DataCard that contains the checkbox and they correctly show me the selected values when I register them for the first time, to show the checkbox with their respective value I am adding in each one in the OnCheck property the following: Collect(Pictogram; ThisItem)
 
In the OnUncheck property I add:
Remove(Pictogram; ThisItem)
In the Default property I add:
If({
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";Id: 0;Value: "Example value 1"
} in Pictogram_DataCard1.Default;true;false)
When I add new information in other fields of the same item that was not entered at the time of creating the item for the first time all the values that were selected in the checkbox are deselected.

In the button where I edit the item and add the missing information I am making use of the SubmitForm function as follows SubmitForm(SharepointForm1);;

Try switching to EditForm(SharepointForm1);; and the values selected in the checkboxes if they are saved but the new information you add in the other fields is not saved.

Is there something that I need to change in any of my properties so that the selected values in the checkbox are not lost?



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

    @sebastianslz 

    What is the Update property of your DataCard and what kind of column is the underlying field of your record for this datacard?

  • sebastianslz Profile Picture
    119 on at

    Hi @RandyHayes 

    The Update property of my DataCard is the name of the collection I created earlier called "Pictogram".

    What do you mean by underlying field? I am not very clear about this concept yet, sorry.
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @sebastianslz 

    What is the name of the field - Pictorgram?

    If so, is it a text column, a lookup column, or a choice column (or something else)?

    And, is it multi-select if it is a lookup or choice column?

  • sebastianslz Profile Picture
    119 on at

    @RandyHayes 

    The name of the same field is called "Pictogram" and is a multiple choice column
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @sebastianslz 

    Very good...

     

    Ideally, it would be more efficient if your checkboxes were in a Gallery rather than individual checkboxes.  This would make your formulas so much clearer.

     

    But, as it is, set your Update property to:

    Filter(
     Table({opt: Checkbox2.Value; Value: "Example value 2"};
     {opt: Checkbox8.Value; Value: "Example value 3"};
     {opt: Checkbox9.Value; Value: "Example value 4"};
     {opt: Checkbox10.Value; Value: "Example value 5"};
     {opt: Checkbox11.Value; Value: "Example value 6"};
     {opt: Checkbox12.Value; Value: "Example value 7"};
     {opt: Checkbox13.Value; Value: "Example value 8"};
     {opt: Checkbox14.Value; Value: "Example value 9"}
     );
     opt
    ) 

     

    You can get rid of the OnCheck and OnUncheck action formulas...you don't need to use a collection or behavioral action formulas.

     

    Your Default properties on the Checkboxes should be cleaned up from what it is, but if it is working at this point, then leave it be.  Otherwise, let me know what the Item property of your form is.

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard