Forum Discussion
Sharepoint list Checkbox
Tobias_Christensen dwahlroos Norman Young this can be done if you create a canvas app in Power Apps and use your SharePoint list as the data source.
My list is towns & villages I have visited in Almeria in Spain (where I live). The list is called Almeria, the ID column has the item's ID and I've renamed the label containing it to lblID. The Title column has the name of the town or village and I've renamed the label containing it to lblTitle. The Visited column in the list is a Yes/No column.
In the data card for the first item add a checkbox with a default value of ThisItem.Visited.
The properties for the OnCheck and OnUncheck are:
OnCheck:
Patch(Almeria, LookUp(Almeria, ID = Value(lblID.Text), {ID: Value(lblID.Text), Title: lblTitle.Text, Visited: true}))
On Uncheck:
Patch(Almeria, LookUp(Almeria, ID = Value(lblID.Text), {ID: Value(lblID.Text), Title: lblTitle.Text, Visited: false}))
The patch function updates the list for the specific ID. It doesn't change any other value apart from the Visited to either true or false which will display Yes or No in the SharePoint list.
You can either embed the app in a SharePoint page or run it as standalone. And this method means you do not need to edit each item to change the checkbox value but can do it on-the-fly and it will update the list in the background as shown in the attached short video..
Do come back with any questions about this.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- Joana Villas-BoasOct 14, 2020Iron Contributor
Hi RobElliott, Well Done! But I don't understand why this can't be done directly in SharePoint out of the box! It should be. Its basic! I was expecting the the new Microsoft Lists would have this functionality, but for my dissapointment they dont have. I hope they solve this issue quickly. Best Regards, Joana
- RobElliottOct 14, 2020Silver Contributor
Joana Villas-Boas it has never been out-of-the-box SharePoint functionality so I doubt it will appear quickly.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- dwahlroosOct 28, 2020Copper Contributor
RobElliott I do beg to differ. It works out of the box on one of their tasks based lists which I use. That's why I thought it should be something simple to implement. I tried to copy what they did but I can't get it and don't have a lot of time to spend on it to do it. It was driving me crazy wondering why I couldn't get it to behave as I wanted it to until I read this thread.
Thanks!