SOLVED

Quick Links - Linking to a Filtered Document Library

Copper Contributor

Hello,

 

Most of our SP site is setup using Quick Links and the Grid view. This gives a nice size of image and a consistent feel to the site. However, I recently wanted to create a new page that allowed users to click on an image of a department and the link took them to a document library which was pre-filtered to only show documents pertaining to that department. But, Quick Links does not support the extended url and strips all the filtering out which is pretty frustrating. I tried the HERO web part and it does the same. 

 

Example URL

sites/MyDept/Shared%20Documents/Forms/AllItems.aspx ? id=%2Fsites%2FMyDept%2FShared%20Documents%2FPolicies%2DProcedures%2DForms&useFiltersInViewXml=1&FilterField1=Contoso%5Fx0020%5FDepartment&FilterValue1=Operations&FilterType1=Choice&FilterOp1=In

 

URL stripped in Quick Links and HERO to

/sites/MyDept/Shared Documents/Policies-Procedures-Forms

 

I managed to get this working using the Image Web Part but this displays in much larger tiles and ruins the aesthetics of the site. 

 

What am I missing? Has anyone else managed to accomplish this? Seems pretty straightforward but I cannot understand why Quick Links and HERO do not supported filtered urls whereas the Image Web Part does. 

 

Many thanks,

Colin2307

14 Replies

@Colin2307 I'm pretty sure that we haven't been able to pass a filter in Quick Links or the Hero web part but if you create the views you want and link directly to them, it should work fine.

@Colin2307  In on premise SP2013, we would run in to the same thing when trying to put a link with url query parameters into the left navigation - it would strip everything from the ? on. I'm giving this a low probability, but maybe try to use an absolute url - start it with https://<tenant>/sites/....... . In SP2013 it wouldn't strip off the parameters if we did absolute not relative.

 

Worth a shot :)

best response confirmed by Colin2307 (Copper Contributor)
Solution
I wrote a blog with something similar, but you should be able to use URL shortening tool is how I get around these for the time being.

https://webbtech365.blogspot.com/2018/11/use-mailto-and-other-link-types-with.html

Hello @Susan Hanley,

 

Many thanks for your prompt response. I did try creating a view and linking to that but the issue remains. The view ID gets stripped from the url (see below - ignore link formatting. I added additional spaces so you can see the entire link)

 

URL with View ID

https:// mysite.sharepoint.com/sites/HSEQ/Shared%20Documents/Forms/AllItems.aspx ? id=%2Fsites%2FHSEQ%2FShared%20Documents%2FPolices%2DProcedures%2DForms&useFiltersInViewXml=1&viewid=14b1c604%2D5d07%2D47c7%2Dad4f%2Dec251ffecede

 

How the system stores it

https:// mysite.sharepoint.com/sites/HSEQ/Shared%20Documents/Polices-Procedures-Forms

 

I am linking to a doc library in another site under but within the same site collection so not sure if this is an issue. 

 

 

Hello @Robin Nilsson,

 

I am lining to another site within the same site collection so I am using absolute url in this case. Good shout though. Thank you. 

 

Best regards,

Colin

Hello @Chris Webb,

 

Ah that's interesting. I didn't think of that. I will give that a try. Thank you Chris.

 

Best regards,

Colin

@Colin2307 Probably another reason not to use subsites! :) My next suggestion is a URL shortening service.

Hello @Susan Hanley,

 

Yes I agree :-). Tried the url shortening as recommended by you and Chris and it works a treat. Thank you @Susan Hanley and @Chris Webb very much.

 

Best regards,

Colin

@Colin2307 

 

Hey Team,

I know this original post was from 11 months ago but I have found the solution for this.

Microsoft have also been informed of the error.

 

If you want your links to work with full filtered info.

 

Take your full link paste it into Notepad

At the start https:// change this to http://

(Remove the S)

Then paste the link in, this will mean it does not strip your info.

Also when you click on the link it re-directs to the https:// page anyway.

 

Much cleaner than using external URL's

 

I was having this same issue and thought this might help some people

Ok so here's the deal...If you want to get the "clean" absolute url for any list/library view in SharePoint Online follow these steps:

1. Visit the view to which you want to point users
2. In the view drop down, select "Edit Current View"
3. On the edit view screen - DON'T DO ANYTHING - just click on "cancel"
4. The absolute url will now be in the address bar (not that crazy ridiculously long thingy from before)
5. Copy this url and paste it into the Quick Links/Hero/Image/Button web parts and you should be good to go

I actually just got off the phone with MS Premiere support on this very issue and they said the workaround is to edit the end of the default view url and type in the words from the title of the view. I tried to explain to the rep that this was prone to errors because view URL's don't update automatically when someone edits the name of a view. It also doesn't work for views that were created with dashes in the name as the URL strips those out.

So to recap....just edit the current view, then cancel to grab a URL that will work in web parts.

I really hope this helps someone save a bunch of time...if you find any holes in my solution, please feel free to let me know.

Lastly, if this actually works for you, please mark it as a solution if possible.

Brilliant. This worked for me... after hours of searching.
Great solution! Annoying issue though ....
Awesome - worked a treat. Thanks

@Michael Malloy  Thanks, great solution worked a treat. However is there a solution for doing the same to a sub-folder within the library?  When I try it it takes my to the root folder of the library and not the sub-folder I would like.

1 best response

Accepted Solutions
best response confirmed by Colin2307 (Copper Contributor)
Solution
I wrote a blog with something similar, but you should be able to use URL shortening tool is how I get around these for the time being.

https://webbtech365.blogspot.com/2018/11/use-mailto-and-other-link-types-with.html

View solution in original post