cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mishatandon
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

@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
mdevaney
Super User III
Super User III

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

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?

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

Hi @mdevaney ,

 

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

 

@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

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

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,340)