Skip to main content

Notifications

Community site session details

Community site session details

Session Id : LvEnh3isRYdK6D9BGLOgYE
Power Apps - Building Power Apps
Unanswered

Help with Checkbox Reset In SharePoint Form

Like (0) ShareShare
ReportReport
Posted on 18 May 2022 20:43:07 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.  

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 25 May 2022 at 17:42:46
    Re: Help with Checkbox Reset In SharePoint Form

    @Anonymous 

    This has been previously discussed in the Idea section.  I don't think it has been implemented yet.  While  you can put a gallery inside a card by cutting and pasting, PowerApps really isn't designed for it.

  • Community Power Platform Member Profile Picture
    on 25 May 2022 at 17:38:22
    Re: Help with Checkbox Reset In SharePoint Form

    @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.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 24 May 2022 at 22:22:51
    Re: Help with Checkbox Reset In SharePoint Form

    @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 24 May 2022 at 22:14:47
    Re: Help with Checkbox Reset In SharePoint Form

    @Drrickryp 

     

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

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 24 May 2022 at 22:08:09
    Re: Help with Checkbox Reset In SharePoint Form

    @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 24 May 2022 at 21:36:48
    Re: Help with Checkbox Reset In SharePoint Form

    @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 24 May 2022 at 21:30:13
    Re: Help with Checkbox Reset In SharePoint Form

    @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 24 May 2022 at 21:22:28
    Re: Help with Checkbox Reset In SharePoint Form

    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 24 May 2022 at 00:29:58
    Re: Help with Checkbox Reset In SharePoint Form

    @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 23 May 2022 at 16:27:26
    Re: Help with Checkbox Reset In SharePoint Form

    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 20

#2
BCBuizer Profile Picture

BCBuizer 10 Super User 2025 Season 1

#2
LC-26081402-0 Profile Picture

LC-26081402-0 10

Overall leaderboard
Loading started