cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Art_Ratta
Resolver I
Resolver I

Select All Item Checkbox and patch Gallery

Dears Community

I need to create Check Box outside a gallery for control Check Box inside gallery for change a value in column of share point list.

 

Now is Done : when checkbox inside a gallery has been checked , this item will patch to SharePoint List.

                Checkbox inside properties (This concept it's working only one by one)

                 Defalse :        If(ThisItem.statusActive="TextValues1",true,false)               

                 OnCheck :     Patch('SP List',ThisItem,{ColumnLinktoCheckbox:"TextValues1"})

                 OnUncheck : Patch('SP List',ThisItem,{ColumnLinktoCheckbox:"TextValues2"})

   

Requirement :

 Create checkbox outside gallery as name : Select All

- If Checked : All checkbox inside has been checked and patch all item to SharePoint too.

- If Unchecked : All checkbox inside has been unchecked and patch all item to SharePoint.

 

Please.

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Art_Ratta :

Do you want this checkbox(Select All) to achieve the following functions:

  • OnCheck :Set the ColumnLinktoCheckbox field of all records in'SP List' to "TextValues1"
  • OnUncheck :Set the ColumnLinktoCheckbox field of all records in'SP List' to "TextValues2"

I've made a test for your reference:

1/checkbox(inside gallery)

                 Defalse :        If(ThisItem.statusActive="TextValues1",true,false)       

                 OnCheck :     Patch('SP List',ThisItem,{statusActive:"TextValues1",ColumnLinktoCheckbox:"TextValues1"})

                 OnUncheck : Patch('SP List',ThisItem,{statusActive:"TextValues1",ColumnLinktoCheckbox:"TextValues2"})

2/checkbox(outside gallery)

                 OnCheck :     UpdateIf('SP List',statusActive<>"TextValues1",{statusActive:"TextValues1",ColumnLinktoCheckbox:"TextValues1"})

                 OnUncheck : UpdateIf('SP List',statusActive="TextValues1",{statusActive:"TextValues2",ColumnLinktoCheckbox:"TextValues2"})

23.gif

Best Regards,

Bof

 

 

View solution in original post

KrishnaV
Super User III
Super User III

Hi @Art_Ratta ,

 

Please answer my 2 questions:
1. The option checkbox inside the gallery is a column in SharePoint list or not?

2. Do you want to click on submit button After selecting the Select all checkbox or it should fire the Patch immediately? (if you want to file immediately I also propose the same solution what @v-bofeng-msft proposed)

 

Let me know so that I can help you better.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @Art_Ratta :

Do you want this checkbox(Select All) to achieve the following functions:

  • OnCheck :Set the ColumnLinktoCheckbox field of all records in'SP List' to "TextValues1"
  • OnUncheck :Set the ColumnLinktoCheckbox field of all records in'SP List' to "TextValues2"

I've made a test for your reference:

1/checkbox(inside gallery)

                 Defalse :        If(ThisItem.statusActive="TextValues1",true,false)       

                 OnCheck :     Patch('SP List',ThisItem,{statusActive:"TextValues1",ColumnLinktoCheckbox:"TextValues1"})

                 OnUncheck : Patch('SP List',ThisItem,{statusActive:"TextValues1",ColumnLinktoCheckbox:"TextValues2"})

2/checkbox(outside gallery)

                 OnCheck :     UpdateIf('SP List',statusActive<>"TextValues1",{statusActive:"TextValues1",ColumnLinktoCheckbox:"TextValues1"})

                 OnUncheck : UpdateIf('SP List',statusActive="TextValues1",{statusActive:"TextValues2",ColumnLinktoCheckbox:"TextValues2"})

23.gif

Best Regards,

Bof

 

 

View solution in original post

KrishnaV
Super User III
Super User III

Hi @Art_Ratta ,

 

Please answer my 2 questions:
1. The option checkbox inside the gallery is a column in SharePoint list or not?

2. Do you want to click on submit button After selecting the Select all checkbox or it should fire the Patch immediately? (if you want to file immediately I also propose the same solution what @v-bofeng-msft proposed)

 

Let me know so that I can help you better.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

On the OnCheck of the checkbox outside:

ForAll(Filter(Gallery1.AllItems, Checkbox1.Value=true),
Patch(SPList,
Defaults(SPList),
{ColumnLinktoCheckbox:"TextValues1"})

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@v-bofeng-msft 

Thank you very , it's working for me. 🙂

but checkbox inside will delay around 10-20 Second after Checkbox outside is checked.

I not sure maybe my environment or not.

1. The option checkbox inside the gallery is a column in SharePoint list or not?

 Answer : yes , when checkbox inside checked or unchecked , Values in a column in SharePoint List will be change.

 

2. Do you want to click on submit button After selecting the Select all checkbox or it should fire the Patch immediately? (if you want to file immediately I also propose the same solution what @v-bofeng-msft proposed)

Answer : Solution from @v-bofeng-msft  it's working.

 

Thank you for the best all of us community.

@eka24  Sorry , it's not working for me after checked outside not any action in a checkbox inside.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (963)