cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndrewGibson1
Helper I
Helper I

Update multiple matching records in SharePoint

Good morning all,

I am trying to navigate an issue around delegations whereby my SharePoint list has 120,000 records, and each record has one or more members of staff who own the record (Column name 'StaffID', eg value u1234567). I use the following formula in the Items property of a gallery to only display the list of records relating to that logged in staff member, so they can then action the record:

 

Filter(SharePointListName, 'Staff ID'= varUserID)

 

where varUserID is a global variable derived from the User() properties.

 

This works fine except for some records my 'Staff ID' column can contain data such as "u1234567, u2345678" (ie 2 people own the record).

 

I want this one record to show up in both peoples list, so I change the Item property formula to:

Filter(ARIES2020FORCodes, varUserID in 'Staff ID')

However this doesnt work on my list of 120,000 records as the 'in' operator is not delagible so I only get results from the first 2,000 records.

 

So I hit a brick wall with that approach (I believe).

 

My new plan of attack is for my SharePoint list to only have 1 Staff ID value for each row (as this then avoids delegation issues). If there are 2 owners for a record, I update my SharePoint list to have 2 rows for the record each with a different Staff ID.

My only challenge now is if one staff member updates the value of another column in the record, I want it to update both records based off another key field (publicationID). This way the other user can see the change too.

I know perhaps not the best architectural design but it will work for what is a short term project.

 

So asking if any thoughts on whether this can be done and what the syntax is - like a patch or something - I would be very grateful for your thoughts.

 

cheers,

Andrew

 

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Super User
Super User

@AndrewGibson1 To update multiple records at the same time you can use the UpdateIf() function.

UpdateIf(yourSPList, publicationID=mypublicationID, {columns to update})

View solution in original post

1 REPLY 1
CNT
Super User
Super User

@AndrewGibson1 To update multiple records at the same time you can use the UpdateIf() function.

UpdateIf(yourSPList, publicationID=mypublicationID, {columns to update})

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 (5,354)