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 can remove hi...
Power Apps
Unanswered

Checkbox can remove his value on a multichoice column in sharepoint list ?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have some understanding with checkboxes on Powerapps. I have on specific column a multi choice option : for example, I have some checkboxes where each of them has a specific value and different values : a, b, c and d.

 

This is my onCheck, OnUncheck, OnSelect and Default on one of them : 

 

- OnCheck

ClearCollect(
	Collection1;
		If(Checkbox1.Value;"a");
		If(Checkbox2.Value;"b");
		If(Checkbox3.Value;"c");
		If(Checkbox4.Value;"d")
)

 

OnUncheck

 

ClearCollect(
	Collection1;Filter(
		Collection1;
		!IsBlank(Value)
	)
);;

 

 

- OnSelect

 

Collect(Collection1; 'Données');;

 

 

- Default

 

If(
	{
		'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
		Id: 1;
		Value: "a"
	} in Matériel_DataCard1.Default;
	true;
	false

 

When I check for the first time the checkbox this work fine, and I see my value inserted on my multi choice column. However, when I unchecked one checkbox (for example I have unchecked the checkbox1 and checked the checkbox2), on my multi choice the value of the first checkbox wasn't removed and the value of the second was added. 

 

How can I remove the value of my checkboxes when I unchecked them ?

 

Thanks for your help.

 

 

 

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to use check box to update a multiple choice column?

    I've tested your formula, this will not create a collection with the data that you select.

    I've made a similar test for your reference:

    1)insert 4 check boxes

    2)Set the check boxes's OnCheck:

    ClearCollect(Collection1,
    {Value:"a",data:Checkbox1.Value},
    {Value:"b",data:Checkbox2.Value},
    {Value:"c",data:Checkbox3.Value},
    {Value:"d",data:Checkbox4.Value})

    In my way, you do not need to set the OnUnCheck property.

    Here's the collection1 that I create:     (I choose a,c,d as an example)8192.PNG

     

    3)Set the submit button's OnSelect:

    Patch(listname,Defaults(listname),{fieldname:Filter(Collection1,data=true)})

    Please consider the data's format that the multiple choice column needs.

    The data format should be like this:8193.PNG

    So using filter function to filter the checkbox value equal to true will lead to this result.

     

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-yutliu-msft thanks for your help.

     

    I was testing each of your points, but when I write the function 

    Patch(listname,Defaults(listname),{fieldname:Filter(Collection1,data=true)})

     I see an error : 'the column fieldname doesn't exist'. I tested with the column name 'Value', but i have the same error.

     

    Regards, 

     

    Nosmoz.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard