cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
neill_long
Responsive Resident
Responsive Resident

Update all records in SP List

Hello,

 

Is it possible to update all records in a sharepoint point list from a click of a button?

 

Looking to update one column in a SP List to update the month to the current month.

 

thanks

4 REPLIES 4
Alexanderbram
Frequent Visitor

Is it supposed to be a happen just once or is the goal to keep the solution at hand for future updates? 
Either way, I would build a quick flow like this:
1. Manually trigger a flow

2. Get items

3. Apply to each, on Value. Add Update Item and adjust the date.

If there are a lot of items, Enable pagination for the Get Items action and adjust the threshold to the number of items in your list.

Gochix
Solution Sage
Solution Sage

Patch(Source,ForAll(Source,{ID:ID,Month:Text(Month(Now()),"mmm")}))

_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

Drrickryp
Super User
Super User

However I've done a test at my side and if using the ForAll properly then it's sometimes faster than only the Patch function..

The results variates from patch+forall being faster and then sometimes patch only being faster but there is no much difference in there..

Screenshot 2022-09-02 at 15.22.11.png

 ForAll used in the tutorial :

 

ForAll(
    ShowColumns(colAttendance, "ID", "Attended"),
    Patch(Attendance, ThisRecord, {Attended: Attended})
);

 

 

ForAll used properly:

 

Patch(Attendance,
    ForAll(ShowColumns(colAttendance,"ID","Attended"),
    {Attended:Attended})
);

 


_____________________________________________________________________________________
Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (4,013)