cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
jasondurr
Nintex Newbie

Copy To SharePoint - Result (On Prem)

Jump to solution

Hi,

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?

Tags (1)
Reply
3 Replies
jflegras
Nintex Newbie

Re: Copy To SharePoint - Result (On Prem)

Jump 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

0 Kudos
Reply
jasondurr
Nintex Newbie

Re: Copy To SharePoint - Result (On Prem)

Jump to solution

Hi,

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:

  1. Get result from Copy to SharePoint - url (not encoded)
  2. Use build string to change result into a server relative url
  3. Use the result as a where clause for the Update item against the Server Relative URL of the destination list

This does not work.

Any ideas?

0 Kudos
Reply
Automation Master
Automation Master

Re: Copy To SharePoint - Result (On Prem)

Jump to solution

Hi,

You can execute the following web request to get the file ID from its server relative url :

http://your_sharepoint_site/_api/web/getfilebyserverrelativeurl('your_file_server_relative_url')/Lis...

Hope this helps

View solution in original post

Reply