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

update massive sharepoint list

Hello,

Hello, I have a sharepoint list with calculated fields, so I need to update it but I cannot write the records one by one because they are too many. How can I do?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Hi @Rob_G ,

Do you want to update the Calculated field from your SP List in your canvas app?

 

Firstly, if you want to update the Calculated field from your SP List in your canvas app, I afraid that there is no way to achieve your needs.

The Calculated field from your SP List would be recognized as a 'Read-Only' type field, which could not be updated in canvas app. So you could not update the Calculated field from your SP List in your canvas app using Patch function or SubmitForm function.

 

If the 'Calculated field' in your SP List is based on other columns in same list, you could consider update the related columns in your canvas app, then the 'Calculated field' would be re-calculated automatically in your SP List.

 

If you want to update your SP List multiple records via pressing a button once time, rather than one by one, I think the ForAll function and Patch function could achieve your needs. You could consider add a Gallery in your app, connect it to your SP List. Then configure your Gallery as a Editable GRID, add some Text Input box inside your Gallery, set the Default property of the Text Input box to following:

ThisItem.Field1
ThisItem.Field2

...

add a "Submit" button outside your Gallery, set the OnSelect property to following:

ForAll(
       RenameColumns(Gallery1.AllItems, "ID", "ID1"),
       Patch(
             'Your SP List',
             LookUp('Your SP List', ID = ID1),
             {
                Field: TextInput1.Text,
                Field2: TextInput2.Text,
                ...
             }
       )
)

you could made changes to the related fields directly through the Text Input box control, then press the "Submit" button, then all changes you made in your Gallery would be updated back to your SP List.

 

More details about configuring a Gallery as a Editable GRID, please check the following video resource:https://www.youtube.com/watch?v=gRAnpZJESiE

https://www.youtube.com/watch?v=O2WqhRTUhyw

 

Please try above solution, hope it helps your scenario.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

@Rob_G 
The PATCH function can update several records simultaneously.  It's not well-known: but you do not have to modify records one-by-one.

From the MS documenation:

ppp.JPG

Link to MS Docs for PATCH:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch#:~:text=Use%20...

---
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
Community Support
Community Support

Hi @Rob_G ,

Do you want to update the Calculated field from your SP List in your canvas app?

 

Firstly, if you want to update the Calculated field from your SP List in your canvas app, I afraid that there is no way to achieve your needs.

The Calculated field from your SP List would be recognized as a 'Read-Only' type field, which could not be updated in canvas app. So you could not update the Calculated field from your SP List in your canvas app using Patch function or SubmitForm function.

 

If the 'Calculated field' in your SP List is based on other columns in same list, you could consider update the related columns in your canvas app, then the 'Calculated field' would be re-calculated automatically in your SP List.

 

If you want to update your SP List multiple records via pressing a button once time, rather than one by one, I think the ForAll function and Patch function could achieve your needs. You could consider add a Gallery in your app, connect it to your SP List. Then configure your Gallery as a Editable GRID, add some Text Input box inside your Gallery, set the Default property of the Text Input box to following:

ThisItem.Field1
ThisItem.Field2

...

add a "Submit" button outside your Gallery, set the OnSelect property to following:

ForAll(
       RenameColumns(Gallery1.AllItems, "ID", "ID1"),
       Patch(
             'Your SP List',
             LookUp('Your SP List', ID = ID1),
             {
                Field: TextInput1.Text,
                Field2: TextInput2.Text,
                ...
             }
       )
)

you could made changes to the related fields directly through the Text Input box control, then press the "Submit" button, then all changes you made in your Gallery would be updated back to your SP List.

 

More details about configuring a Gallery as a Editable GRID, please check the following video resource:https://www.youtube.com/watch?v=gRAnpZJESiE

https://www.youtube.com/watch?v=O2WqhRTUhyw

 

Please try above solution, hope it helps your scenario.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted

@Rob_G 
If you are updating several records at once the method proposed by @v-xida-msft is going to be painfully slow.  FORALL + PATCH updates records one-by-one whereas my suggestion updates all records at once.

 

---
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
Community Support
Community Support

Hi @Rob_G ,

Have you taken a try with the solution I provided above? Is it helpful?

 

If you have any issue when you try the solution, please feel free to let me know here.

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Thank you
Sorry for the delay, I understand what I said.
It occurred to me, it was not having calculated fields in my sharepoint list and I ran the calculations in the Powerapps application.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,100)