Get the URL of a document from the document library and save the link to a column

I wanted to create a library where user has option only to download the document in SharePoint. They should not able to open the document in Edit or Read-Only mode but they have to download it.

First I created a library and I created 2 columns - one single line text column(Name: Path) and one calculated column(Name: cal).

Create a workflow for that library where we copy the "Encoded URL" with download path into the single line text column. We need to check out and check in the document in the workflow as shown below.



In the above image "then copy from" link is as below with the "Encoded URL".


We are updating the link to a column in the above workflow and check in the document.

Now we create a calculated column use the below formula.


="<a href='"&Path&"'>Click Here to Download the Document</a>"



Now when we look at the library it looks like this.


No comments:

Post a Comment