cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Button to update multiple items in one go

Dear community,

 

I have a sharepoint list which has multiple columns but I will focus on 3 columns that are required to build below requested functionality:

 

Manager ProjectName Sign off status

A               1                       (blank)

A                2                       (blank)

A               3                         (blank)

B                4                        (blank)

B                5                        (blank)

C                6                         (blank)

C                7                         (blank)

 

The application will focus on Managers to see their project specific information( row level security) and will update information on Power Apps which will update sharepoint list. This has already been built but I am stuck on the last bit which I am not able to build.

 

I need to build a button 'save' on the final page of the application that will:

1) Once the manager clicks on this button 'ALL', for all his projects the value in column Sign off status is updated to 'Yes'. For example as soon as manager A clicks on this button then column sign off status on sharepoint list is updated to yes for projects 1, 2 and 3.

2) Individual project manager's information is only updated and doesnt wrongly update anybody else's information.

 

Please let me know if there is clarification required.

 

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Button to update multiple items in one go

@Mishatandon 

Make sure all of the datasource and column names match your actual SharePoint list.

UpdateIf('datasource sharepoint list', User().Email in emailid,{'Sign off status':"Yes"})

 
If you have more rows in SharePoint than the delegation limit of 500 (or 2,000 with the advanced settings increased) then the UPDATEIF formula will not work.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

7 REPLIES 7
Highlighted
Super User
Super User

Re: Button to update multiple items in one go

@Mishatandon 

Here's what you should put in the OnSelect property of the button.

UpdateIf(your_collection_name, Manager=varManager And 'Sign off status' <> "Yes", {'Sign off status': "Yes"})

 

I assume you have a variable called varManager which stores the current manager's name and that both Manager and 'Sign off status' are Text columns.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper III
Helper III

Re: Button to update multiple items in one go

Hi @mdevaney ,

 

I am not using any variable but using Filter function to filter data basis the email id.

 

I had written the below formula basis that however its not updating the values in sharepoint once I click on the button.

 

Yes the sign off status is 'single line of text' data type on sharepoint.

 

UpdateIf('datasource sharepoint list',Filter('datasourcesharepoint list',User().Email in emailid),{Sign_x002d_off_x0020_status:"Yes"})

 

Anything wrong with my formula?

Highlighted
Super User
Super User

Re: Button to update multiple items in one go

@Mishatandon 
FILTER is not allowed in the 2nd parameter of UPDATEIF.  Instead you must write the criteria like this:

UpdateIf('datasource sharepoint list', User().Email in emailid,{Sign_x002d_off_x0020_status:"Yes"})

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper III
Helper III

Re: Button to update multiple items in one go

Hi @mdevaney ,

 

Made the changes, no syntax or any other error but its not updating the sharepoint 😞

 

Highlighted
Super User
Super User

Re: Button to update multiple items in one go

@Mishatandon 

Make sure all of the datasource and column names match your actual SharePoint list.

UpdateIf('datasource sharepoint list', User().Email in emailid,{'Sign off status':"Yes"})

 
If you have more rows in SharePoint than the delegation limit of 500 (or 2,000 with the advanced settings increased) then the UPDATEIF formula will not work.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Helper III
Helper III

Re: Button to update multiple items in one go

@mdevaney 

 

Thanks! let me try to figure out what am I doing wrong as there is only 1 sharepoint list item for testing.

 

BTW where will the setting change happen for updating more than 500 items? On sharepoint? I never knew that!

Highlighted
Super User
Super User

Re: Button to update multiple items in one go

@Mishatandon 
Correct, the behaviour will change once you pass the delegation limits in SharePoint since UPDATEIF cannot be delegated 🙂


Link To MS Article

https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

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

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

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,246)