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 Uncheck patch...
Power Apps
Unanswered

Checkbox Uncheck patch to a SharePoint list and Slider progress bar

(0) ShareShare
ReportReport
Posted on by 9

Hello All,

 

I tried looking for an existing article covering this specific scenario but couldn't find anything, so I finally decided to post my question here. I hope you can help me out, appreciate any assistance in advance.

 

Background:

I am creating an Onboarding platform using PowerApps and a SharePoint list as DataSource.

 

The SharePoint list contains:

Task [Multiple lines of text]
Instructions [Multiple lines of text]

Links [Multiple lines of text]

Done [Yes/No]

ProgressBar [Number]

ID ([Number] The one that SharePoint generates)

 

The PowerApps screen contains (picture included for reference):

 

A Gallery which contains a Checkbox, a Label and an Icon.

A Slider (Progress Bar).

A Button "Next".

 

The Gallery:

Items property is based on collectionOnboarding.

collectionOnboarding contains the same columns that are in the SharePoint list OnboardingTask plus a generated column named "IsChoosen", the formula is:

ClearCollect(collectionOnboarding, AddColumns(OnboardingTask, "IsChoosen",false));

 

The Checkbox:

OnCheck property contains the following formula:

UpdateContext({sliderValue: ProgressBar+12.5});

Patch(collectionOnboarding, ThisItem, {IsChoosen:true});

 

UnCheck property contains the following formula:

UpdateContext({sliderValue: ProgressBar-12.5});

Patch(collectionOnboarding, ThisItem, {IsChoosen:false});

 

The Label:

Its Text property is: ThisItem.Task

 

The Icon:

It's OnSelect property is: Set(varRecord, ThisItem);Navigate(OnboardingDetails, Cover)

(After I resolve the current issue, I will use this OnboardingDetails to Update the task content)

 

The Slider (Progress Bar)

It's Default property contains: sliderValue

It's Min property contains: 0

It's Max property contains: 100
It's DisplayMode is set to: View

 

The Button:

IT's OnSelect property contains:

ForAll(RenameColumns(Filter(collectionOnboarding, IsChoosen), "ID", "OID"), Patch(OnboardingTask, LookUp(OnboardingTask, ID=OID), {Done:IsChoosen}));

ClearCollect(collectionOnboarding, AddColumns(OnboardingTask, "IsChoosen", true));

 

It's DisplayMode property contains:

If(ProgressBar<100,DisplayMode.Disabled,DisplayMode.Edit);

 

The screen OnVisible property contains:

UpdateContext({sliderValue:0});

 

 

Scenario:

What I am trying to achieve with all this, is:

1. User will check each checkbox as it progress through the specific tasks. (This is working)

2. When user clicks each checkbox, the slider will grow until reaching it's maximum value. (This is working)

3. Only when the slider reaches its defined maximum value the button will be available to click, otherwise it will be disabled. (This is working)

4. When the user hits the Next button, It should patch the IsChoosen (checkbox value) "Yes" to the "Done" column of the SharePoint list. (This seems to be working, picture included)

6. When user comes back to this screen only by unchecking a checkbox it should update the status of the SharePoint list "Done" column to "No" and the progress bar should decrease accordingly. (This is not working, There are two points here:

a. The progress bar resets to 0 as per the OnVisible property states, I placed it like that, because I didn't find a different way to initialize it to 0, it was always showing at 50%.

b. When the user uncheck the checkbox it is not patching a "No" (false) to update the checkbox new status in the SharePoint list.

 

I hope I was clear enough and again, appreciate any assistance/help you can provide me to solve this situation.

 

Thanks and have a great day.

SPColumnDoneYes.png
PowerAppsCheckList.png
Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Franx 

    Although others may give you different advice, it seems to me that it is your checkbox & Yes/No column type creating the problem.  I never use this column type and in SharePoint only use single line of text, numbers and date/time type columns.  Any other type of column is better handled in PowerApps.  Checkboxes are either true or false.  It doesn't matter what the truetext  and falsetext on them says.  I would go back to SharePoint and change the column type to Single line of text and allow the Checkbox to be saved as true or false in your IsDone column.  Then reassess your app and my guess is it will work fine as your logic seems sound to me.

  • Franx Profile Picture
    9 on at

    Hello @Drrickryp 

    Thanks for your quick response and your comments, appreciate the insight about the column type, but that is not quite what I am looking for as this still doesn't work as I expect it to work. The problematic points here are that when the user comes back to the tasks screen and uncheck a checkbox it doesn't update the status of the SharePoint list "Done" column to "No", currently the collection is the only one changing the status, but I need to patch the new "No" status back to the SharePoint list but I don't know the formula to achieve that, I was thinking in placing a patch formula in the UnCheck property but no formula I've included seems to work, this is the last formula I tried to use: ForAll(RenameColumns(Filter(collectionOnboarding, IsChoosen), "ID", "OID"), Patch(OnboardingTask, LookUp(OnboardingTask, ID = OID), {Done:IsChoosen})); but nothing happened.

    Second, the progress bar currently resets to 0, but I would like to know another way to make it initialize to 0 at the beginning without using the OnVisible UpdateContext, because then after the users make the slider reach to it's maximum value through checking all the checkboxes, it will go back to 0 every time is 'OnVisible' and I don't want it to initialize to 0 every time I go back into this screen as I need the slider to maintain its value and only decrease when the user uncheck the checkboxes.

     

    Appreciate your help.

    Thanks.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 860

#2
Valantis Profile Picture

Valantis 548

#3
Haque Profile Picture

Haque 417

Last 30 days Overall leaderboard