cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
samdegroot
Frequent Visitor

Sharepoint: Update file properties - Could not find list item

Hi there!

 

I am trying to create a flow that updates a files properties (name) when a task is completed. However, I have stumbled across a little problem which i can't seem to fix so I will take a gamble and ask you folks.

 

To give a short summary about this flow:

I have a planner board which has different task on it. These task all have a corresponding folder (named after their Id). When a task is finished, this flow gets hit. The flow then searches for a folder that corresponds in name with the id of the task that is finished. After that, it will search this folder for an .xlsx file. It reads the data out of the tables that are in the .xlsx file and composes that into a couple of strings. These strings then later form the name of the document.

 

I am able to get all the data out of that excel sheet and use it to compose strings, but I am not able to update the file properties. The error Flow is throwing me is:

{
  "status"404,
  "message""Could not find list item.\r\nclientRequestId: 1406b4be-d09e-41a2-80c8-7b1e03af1257\r\nserviceRequestId: XXXXXXXXXXXXXXXXXX"
}
 
This is a screenshot of the connector:

 

Annotation 2020-06-02 194608.jpg
The inner code for the item value is:
item()?['Id']
 
My item looks like this:
 
{
   "Id":"%252fGedeelde%2bdocumenten%252fMeldingen%252fBijlages%252fgZHqywfJZ0WTPew65vfpn5cADPcD%252fLog_CustomerName.xlsx",
   "Name":"Log_CustomerName.xlsx",
   "DisplayName":"Log_CustomerName.xlsx",
   "Path":"XXXX",
   "LastModified":"2020-06-02T16:59:49Z",
   "Size":54904,
   "MediaType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
   "IsFolder":false,
   "ETag":"XXXXXXXXX",
   "FileLocator":"XXXXXXXXX",
   "LastModifiedBy":null
}
 
 I hope i have been clear enough in explaining my issue. Thank you dearly for your help!
 
1 ACCEPTED SOLUTION

Accepted Solutions

With using the function ['Get a Task'] and then composing the ID as a string, i was able to solve this problem. I do not know why but i think you are unable to use the ID property from the ['get a task'] function in a dynamic flow. I think you have to convert it to a string first for some reason.

View solution in original post

4 REPLIES 4
JonLeitner
Microsoft
Microsoft

I'm having the same issue... did you find a solution? 

I'm getting the same error on this action, using the Identifier from a Get File Properties as the ID of Update File Properties. 

JonLeitner
Microsoft
Microsoft

I think my issue may have had something to do with a datetime format. I changed the custom field I was trying to update to a single line of text, and it worked flawlessly. 

With using the function ['Get a Task'] and then composing the ID as a string, i was able to solve this problem. I do not know why but i think you are unable to use the ID property from the ['get a task'] function in a dynamic flow. I think you have to convert it to a string first for some reason.

Interesting! Thanks for the update. 
 
I'm using Logic Apps, but I'm assuming the functionality is pretty much the same with the SharePoint actions. 
I was trying to update a custom property after the file itself had been updated ( overwritten ) inside a switch case. 

I moved the update file properties action outside of my switch, and that seemed to do the trick. Also, I changed the custom property to a string instead of date time since I was running into formatting issues. 
logic app.png

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,526)