Create hyperlink in a document set to return at the previous page

emarck 2010 21 Reputation points


few months ago I have find the trick to make this working on my dev server.
But after a bug, I have lost the document set folder with this function.

Now I try to create again this famous URL to give the option to my user to return in the previous page with the right information.

My config :

I'm in SP2016, I have create a list where I have the planning of a meeting.

This planning is auto create by a workflow who start when the user create a new folder (docset) in another list.

The list who contain the planning is connect to the other list where the docset is create.

So when I'm on the planning list page I could click on the double arrow at the left of any elements of the list. to filter the second list and find the right docset in link with this planning.

This part work very well.

My user add somes documents in the docset in link with the meeting associate at this planning.

Now what I try to recreate :

In the docset home page, I want add a hyperlink who give the option to return at the planning page with the right planning information and the rigth docset.

I already use the date of the meeting fields in the planning elements and in the docset.

I use this date fields to connect the 2 lists.

When I have finish by make the hyperlink working, I remember than I have use the URL of the planning list page with filter value catch in the fields of my docset.

But I dont remember the structure of this URL.

I have make somes test and if I use this URL on the planning web page I could use the filter option and present the rigth information for the planning, but the docset folder is not present. If I click on the double arrow the page refresh and I lost the information who are replace by the default view.

http://my sharpoint server url/sites/name of the site/list/name of the list/list.aspx?FilterField1=Date&FilterValue1=2020-05-16

When my old hyperlink worked, I think than I used the date value in the docset to make the filter, but I dont remember or I could pass this value by URL.

I have try somes URL version without succes.

I think than this URL version is very similare at the working URL, but the planning list stay empty.

http://my sharpoint server url/sites/name of the site/list/name of the list/list.aspx?FilterField1=Date&FilterValue1="&docsetdatefield&"

Any hints is welcome !

Thank you

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,274 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. CaseyYang-MSFT 10,326 Reputation points

    Hi @emarck 2010

    Do you want to use URL parameters to filter a SharePoint list? What do you mean "I use this date fields to connect the 2 lists"? Are you using look up column?

    Per my research we could add ?FilterField1=[FieldName]&FilterValue1=[FilterValue] to the end of the list’s URL to filter it. And If your value includes spaces, replace them with %20.

    If an Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. emarck 2010 21 Reputation points

    Yes I want use URL parameters, but I need to catch the date fields value in the docset and use it to filter the first list in the previous page.

    I have try many time with ?FilterField1=[FieldName]&FilterValue1=[FilterValue], but each time the first list in the previous page stay empty.

    I dont remember how I have make last time to catch the field value of the docset.

    I have view in another site than we could put '$fields_name$' in the formula query. So I have try this structure and SP dont give me error, but dont apply the filter on the list too.

    http://mysharepoint server url/sites/name of the site/list/name of the list/list.aspx?FilterField1=Date&FilterValue1="&docsetdatefield&"

    I will continu to search solution on my side, if you have an idea let me know !

    0 comments No comments

  3. emarck 2010 21 Reputation points


    I have try to find solution with simple URL like I think than I have before.

    But more I search and test, more i'm not sure of my memory...

    My memory let me thing than I have a URL like this

    http://mysharepoint server url/sites/name of the site/list/name of the list/list.aspx?FilterField1=Date&FilterValue1="&docsetdatefield&"

    But each test I have make give the same result. The list load the default view and the FilterField1 stay empty in the URL.

    So I have continu the research and test.

    I have find than it was possible to built a URL via a calculate field, but Microsoft have block this option since few version.
    So this is not availaible, you could go deep in SP configuration with powershell to put the block value at false or true, but if like me you are in SP 2016 and in few years you will go in SP Online.

    This hack doesn't work anymore.

    I finish by find a methode to have a working URL :o)

    Like I use a workflow to create items in my planning list.

    I have add a new fields in this list with hyperlink format.

    Like my actuel workflow catch the date of the meeting and put this date in a variable, I add somes code in the workflow to
    copy the variable content in another and create a new variable with my complete URL with right filter value.

    The result is http://spserverurl/sites/cdd//Lists/list name/list.aspx?FilterField1=date&FilterValue1=2021-07-19

    For testing I have copy this URL in the workflow history.

    When I click on it, it charge the page with the good planning.

    Here is the step I have use:

    1. catch the date value in the workflow variable.
    2. Convert the value in ISO format for date and hour.
    3. Extract the 10 first char from the variable to retrieve only the date 2021-07-19 and copy this value in another variable.
    4. add this variable in the update list command and link this one with the new fields hyperlink.
    5. In the docset content type, go in properties and advance parameters and select the hyperlink fields and share it on the docset home page view.

    Like this I have a hyperlink to the right planning list in my docset.

    If I click to view the content of the docset, I could click on the link to return at the previous page and activate the filter for the date include in the docset home page.

    That's resolve a good parts of my issue.

    But when i make test, I have another bug.

    Like I use the connection option between my 2 webparts, when I return on the page with this link.

    The filter option disable or block the link between my webparts.

    If I click on the link the page load and the URL is http://spserverurl/sites/cdd//Lists/list name/list.aspx?FilterField1=date&FilterValue1=2021-07-19

    I view all elements with the 2021-07-19 date, but no docset in the second webparts.

    If I click on the double arrow at the left of an items, the URL change at the top of the page, but the page do not refresh correctly.

    It's like than the filter option disable a part of the connection between the two webparts.

    If I click to select the new URL and press entrer ou use F5 to refresh the page, the docset with the date 2021-07-19 finish by load in the second webparts.

    But I lost the filter option and the list item load the default items who are not at the same date.

    The best could be than I have the right items ID and try to change the URL to filter witht his item id.
    Or find a way to force a complete refresh of the page without lost the filter information an let the docset load correctly when we click on
    the double arrow icons.

    Any hint about this bug ?

    0 comments No comments