How to: Share private filters

Applies to: SharePoint List Filter Web Part for SharePoint on premise (SP2010, SP2013, SP2016, SP2019)


The Filter Web Part currently only allows administrators to create public filters. All other filters created by users are private and can only be viewed by the user who created them. However, it is still possible to share your private filters with other users. You can customize the link to a page you wish to share so that it loads automatically with your filter and you can also make a private filter visible to all users when sharing it.

Predefined filters

Firstly, it is possible to apply a pre-defined filter when initially loading the page by adding ?FilterID=[ID] where [ID] is the ID of the filter you want to load to the end of your page’s URL.

Private URL

Click on Manage filters and add the ID column to the view to find the ID of your filter.

Manage filters

This is, however, only possible for public filters, as other users do not have access to your private filters. To share this filter, simply add &Share=1 to the end of the filter URL and you can then share the filter with other users. This feature is available in the latest release, published on 09/30/2015.

Public URL

In the future we may also release a feature making it easier to share a pre-defined filter by automatically creating the shareable link for you.

In the meantime you can add the following javascript to the predefined filters view to add a ‘Share this filter’ menu item.

<script type="text/javascript">
function Custom_AddListMenuItems(m, ctx) {
    var itemID = ctx.LastSelectedItemIID;
    itemID = itemID.split(",")[1];
    CAMOpt(m, "Share this filter", "window.location.href = 'mailto:?body="+escape("http://[link to the filter page].aspx?Share=1&FilterID="+itemID)+"'; return false;");
    CAMSep(m);
}
</script>
<script type="text/javascript">
function Custom_AddListMenuItems(m, ctx) {
    var itemID = ctx.LastSelectedItemIID;
    itemID = itemID.split(",")[1];
    CAMOpt(m, "Share this filter", "window.location.href = 'mailto:?body="+escape("http://[link to the filter page].aspx?Share=1&FilterID="+itemID)+"'; return false;");
    CAMSep(m);
}
</script>

I hope you found this guide useful. If you have any problems or any other questions, please send an e-mail to support@sapiens.at or post a comment.