web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with Checkbox Res...
Power Apps
Unanswered

Help with Checkbox Reset In SharePoint Form

(0) ShareShare
ReportReport
Posted on by

Hi, All.  I've tried several posts and videos and I just can't get this to work:

 

I've created a default SharePoint list form in Power Apps, and changed the multi-select drop-downs to checkboxes within galleries.  It all works well, except when I click the New form button in SharePoint, the form doesn't clear the previous checkbox entries.

 

If possible, I'd like the entire form to reset when the New SharePoint form button is pressed.   Right now it does, except for the checkboxes.  

 

Here are my details (collection is colCategoryData):

 

  1. Checkbox:
    1. Text: ThisItem.Value
    2. OnCheck: Collect(colCategoryData, ThisItem)
    3. OnUncheck: Remove(colCategoryData, ThisItem)
    4. Default: ThisItem.Value in colCategoryData.Value
  2. Data Card:
    1. Default and Update: colCategoryData
  3. Gallery
    1. Items: Same as original multi-select drop-down

 

Anything beyond this that I've found (variables, OnVisible, Reset) doesn't work.

 

Please and thank you.  I'm pulling out what little hair I have left.  

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

    @Anonymous 

    Did you put the gallery inside a card on the form?

  • Community Power Platform Member Profile Picture
    on at

    Hi, Drrickryp. 

     

    Yes. 

     

    I followed Reza's vid, including info in the comments for SharePoint forms, and check boxes are still not clearing when a new form is opened.  

     

    Everything else seems to work fine.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Check this post to see if the solution works for you.   https://powerusers.microsoft.com/t5/Building-Power-Apps/multiselect-check-boxes-in-custom-SharePoint-form-with-PowerApps/m-p/1427869 

  • Community Power Platform Member Profile Picture
    on at

    Hi, @Drrickryp .

     

    Thanks for the link, but it didn't help.  Opening a new form in SharePoint still retains the checkbox info of the last saved form.  I also notice that if you open a new form then cancel it, the checkboxes in previously saved forms are blanked out.   

     

    Here's my process and code, taken from the video by @Reza as well as other sources such as the link you sent.

     

    1. Copy formula in Items property of the combo box
    2. Delete combo box from Datacard
    3. Insert gallery into Datacard (insert, then cut/paste)
    4. Insert a single Checkbox into the Gallery
    5. Paste the formula from step 1 into the Gallery Items property

    Storing/removing SharePoint list values

    1. Checkbox
      1. Text property: ThisItem.Value
      2. OnCheck property: Collect(colCategoryData, ThisItem)
      3. OnUncheck property: Remove(colCategoryData, ThisItem)
      4. Default property: ThisItem.Value in colCategoryData.Value
    2. Data Card:
      1. Change Default and Update property to colCategoryData
    3. FormScreen1:

    OnVisible:

    Clear(colCategoryData);

    If(SharePointForm1.Mode <> FormMode.New,

    (

    Collect(colCategoryData,

    LookUp(SPLISTNAME,ID=SharePointIntegration.SelectedListItemID,SPCOLUMNNAME)

    )

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    It appears to me that the checkboxes are dependent on  colCategoryData.  If the collection is cleared, then the checkboxes should be returned to their default state.

  • Community Power Platform Member Profile Picture
    on at

    @Drrickryp 

     

    Are you saying this should be working as written, or that it needs changes?

     

    Phil

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    When you open a Form in New mode, Clear(colCategoryData).  If the gallery depends on that collection, it will not retain old information. 

  • Community Power Platform Member Profile Picture
    on at

    @Drrickryp 

     

    Sorry if I'm being dense, but how would I make this happen?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Anonymous 

    Since I don't use Integrated SharePoint forms, I am not familiar with the specific commands but there must a button that you push to open the form in New mode,  It would have NewForm(Form...) as a command.  If you find it add

    NewForm(Form1);Clear(colCategoryData)  Then when you navigate to the form, the Gallery should be reset.

  • Community Power Platform Member Profile Picture
    on at

    @Drrickryp 

     

    Thanks for all of your help.  Your advice has gotten me closer, but it's still not working as expected.

     

    I just wish it was easier to create something as basic as check boxes in PowerApps.  I'm going to have to find a different solution, I guess.

     

    Thanks, again.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard