I currently use the Copy To SharePoint action to copy a document from one library to another. The result of the document copy is provided as a URL.
I then need to update that new list item with additional data. In order to do so, I am trying to use the where clause with the result that was returned. I have queried against the Encoded Absolute URL, the Server Relative URL (after doing string manipulation) but I am not having any success.
Is there a best practice for determining the new item created so that you can update metadata after it is created?
Solved! Go to Solution.
Hi Jason Durrant
Copy to SharePoint action returns a full url, not encoded : http://www.contoso.com/sites/library/hello world.docx
item properties Relative Url returns relative url, not encoded : /sites/library/hello world.docx
So, use a build string to replace the site name (url beginning) by nothing in your variable and use this value to update item
This is what I tried initially but it failed when the document had a space in the name. That is why I attempted to encode it. So, to clarify:
This does not work.
You can execute the following web request to get the file ID from its server relative url :
Hope this helps