cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Yep @Serviced2000 ,

I have done a bit more on settings, but the more I do the more I break it.

I vaguely remember a similar post a little while ago but cannot presently find it. From memory that one was not fully resolved either.

Highlighted
Regular Visitor

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Thanks @WarrenBelz , if it comes back to you please let me know.

 

What I may do in the meantime is ditch having the toggles do anything at all (other than represent a true / false value) and insert another 'Use Selected' button that does the updating in Sharepoint but references the toggled items in the gallery. If there's a good way to do that, any further pointers or code snippets would be great.

Highlighted
Community Champion
Community Champion

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Hi @Serviced2000 ,

Also tried attaching the checkbox to a yes/no field in the data source and show the value when selected - works a bit better but still not perfect - does not need the Variable

Highlighted
Community Support
Community Support

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Hi @Serviced2000 ,

 

I can also reproduce this issue.

My workaround is to add a save button on the screen to save all toggle value in Gallery to SharePoint list in bulk.

1. clear the OnCheck and OnUnCheck property of toggle

2. add a Save button, set OnSelect:

 

ForAll(RenameColumns(GalleryName.AllItems,"ID","OID"),Patch('SP list',LookUp('SP list',ID= OID),{TwoOption:If(Toggle1.Value,"Yes","No")}))

 

Snipaste_2020-04-07_17-43-57.png

Hope this helps.

Sik

 

 

Highlighted
Community Champion
Community Champion

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Hi @Serviced2000 ,

What @v-siky-msft has suggested is something I already do with a collection selecting crew for jobs.

If you want to head this way, I have the sample code.

Highlighted
Regular Visitor

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Thanks @v-siky-msft ,

 

This was going to be the next direction I was going to take on this. I'll give this a try.

Highlighted
Regular Visitor

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Thanks @WarrenBelz,

 

Sik shared a code snippet in his response I can try but any pointers you might have that work would be great too! 🙂

Highlighted
Community Champion
Community Champion

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Hi @Serviced2000 ,

I posted this one a short time ago - the second bit is similar to what you need - using this syntax, yours I believe would be something like

ForAll(
   RenameColumns(
      YourGalleryName.AllItems,
      ),
      "ID",
      "IDRef"
   ),
   UpdateIf(
      'SP list',
      ID = IDRef,
      {
         Consultant_Selected:
         If(
            Toggle4.Value,
            "Yes",
            "No"
         )
      }
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

Highlighted
Regular Visitor

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Thanks @WarrenBelz and @v-siky-msft ,

 

The 'Save' button idea works and it updates the Sharepoint list no problem, but when I press it the toggles immediately go back to the 'false' / 'off' state. I created a brand new app so that none of my earlier changes would have an effect but that doesn't seem to have worked either. I'm really confused as to why something like this would be so difficult to implement.

Highlighted
Regular Visitor

Re: Gallery Checkboxes and Toggles Uncheck Automatically

Hi All,

 

Actually, this behaviour will work for me as we need to do a 'reset' on all the selections later in the workflow so I'll mark this as solved! 

 

Thanks for your help everyone!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,323)