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