I want to give some link to open the document Library like if user click on this link
<a href='http://sharepoint/myDocLib/xyz.pdf'> open doc</a>
then show the xyz.pdf in Document Library.
-
1But if the user clicks the title, the document opens, right?– Benny Skogberg ♦Commented Feb 20, 2017 at 8:29
-
Yes correct @Benny– AdminCommented Feb 20, 2017 at 8:51
-
But you want to filter out which documents the user sees?– Benny Skogberg ♦Commented Feb 20, 2017 at 8:55
-
No i want to just open the given document like <a href='sharepoint/myDocLib/xyz.pdf'> open only xyz.pdf– AdminCommented Feb 20, 2017 at 9:38
2 Answers
Use a query string filter webpart and connect it to the document library. Safest is to filter by ID.
you then you can share your url that ends something like mypage.aspx?DocumentId=1
tip: using ?Id=1 won't work.
If you just want to share a link to a view with filters, try to append the filter to the URL like this:
http://sharepoint/myDocLib/view.aspx?FilterField1=FILTERFIELDNAME&FilterValue1=FILTERVALUE
But you can not filter on each field! You can check this if you just try to apply the filter in the view by using the heading column (click on field heading). Then you can copy the browser URL and modify.
If you want to achieve something other please clarify your question.