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
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