2

I have a URL of a document/File from One of my Document library so from that URL I want to get the only name of that specific document/file. I have server relative URL like
sites/appdev/MyLibrary/Doc.png and I want to get only Doc.png how can I get this?

1 Answer 1

2

You can store Name of document by using [Current Item : Name] in a variable.
OR
1. Use action Set workflow varible to store the string. (e.g. string = sites/appdev/MyLibrary/Doc.png)
2. Find MyLibrary in string (Output to Variable: index)
Index contains the result, which would be number 14.
3. Copy 14 characters from end of string (Output to Variable: substring)
This will return MyLibrary/Doc.png.
4. Find / in substring (Output to Variable: index1)
Index1 contains the result, which would be number 10.
5. Copy from substring, starting at 10 (Output to Variable: substring1)
substring1: Doc.png

Reference: http://www.documentmanagementworkflowinfo.com/sharepoint-2013/sharepoint-designer-workflow-string-actions.htm

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.