cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ramsabi
Helper II
Helper II

Metadata update of documents in sharepoint

Periodically we review our documents and update them. The name of the files to be updated (without file extensions) are in an Excel file and the metadata in rows. These files are in a library in Sharepoint. To update the metadata, I have to first checkout the file (company policy. Checkout cannot be turned off).
I have figured out the update andd checking back in part, but unable to get the files checked out first. Can someone help me please?

Thanks in advance

1 REPLY 1
ekarim2020
Super User
Super User

The flow would resemble something like this, where we would use the SharePoint item ID to check-out, rename and check-in the file.

ekarim2020_2-1627727189188.png

 

Uri: _api/web/lists/GetbyTitle('Documents')/items(8)/validateUpdateListItem

Body:
{
  "formValues": [
    {
      "FieldName": "FileLeafRef",
      "FieldValue": "TEST123ABC.docx"
    }
  ]
}

 

As the files you need to rename are stored within an Excel file - without file extensions - you would need to query SharePoint for files beginning with the name stored in Excel. Hopefully you already know the correct file type to rename (Test061.doc, Test061.xlsx, Test061.pptx).

Hope this helps.

Ellis

____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,048)