none
List items filter using URL FilterField1= & FilterValue1= no longer works RRS feed

  • Question

  • Its no longer working with SP 2010 scenario url filter options in SharePoint 2013. I still see one or two records filter options out of 10 are still working with SP 2010 filter format url   AllItems.aspx?FilterField1=Title&FilterValue1=test

    When I researched, it is in the following format:

    #InplviewHash{viewid}=FilterField1%3D{columnname}-FilterValue1%3D{columnvalue}

    But I have a challenge of even with columnValue of text type as well. The above syntax works well until columnValue and I have a column values like this:

    3:16md2051      1:13mp20342      9:16so894      2:16ws2345   (The field type is of text)

    However when I manually filter the url shows similar to the screen below:

    FilterValue1%3D%250A0%253A16cv3352%250A  (Not sure why the text fields are converted like this)
    FilterValue1%3D%250A1%253A15cv12730%250A
    FilterValue1%3D%250A1%253A15cv13124%250A
    FilterValue1%3D%250A1%253A16cv7229%250A
    FilterValue1%3D%250A1%253A16cv894%250A

    If I replace after %3D with actual column values, the list doesnot return any items. however if I filter column header, the column will will be generated similar to the screen shown above.

    Could you please any throw some light? How can I use the filter options using the url.

    Thanks

    Shri

    Tuesday, January 10, 2017 1:22 AM

Answers

  • Hi,

     

    We could use replace function to replace character ‘:’, here is the sample code.

    =REPLACE(data,INT(FIND(":",data)),1,"")

     

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by ShriG Wednesday, February 8, 2017 11:28 PM
    Friday, February 3, 2017 8:46 AM

All replies

  • Hi,

     

    I tested this in my local(IE) and it’s working, make sure you use field internal name and try with IE browser.

    Here is one thread for your reference.

    http://www.enjoysharepoint.com/Articles/Details/sharepoint-2013-list-view-item-filter-based-on-query-string-21179.aspx

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, January 11, 2017 2:24 AM
  • Thanks Lee. I do see random field values display correctly. For example, when I filter within the list for the value "1:16cv7229" it filters but the url captured value as  FilterValue1%3D%250A1%253A16cv7229%250A. The field type is single line text. Not sure what the issue is.

    I guess that's the reason it doesn't filter and redirects "There are no items to show in this view of the "CustomList" list. Any idea why the field value gets parsed something like I said above?

    Thanks

    Shri

    Wednesday, January 11, 2017 6:40 PM
  • Hi,

     

    Do you have any logic to encode the URL/value for the filter link?

    If the URL is auto encoded, what’s the browser you’re using?

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, January 12, 2017 1:55 AM
  • I am using SPFieldUrlValue. here is the logic I use. It works 100% fine in SP 2010.

      SPFieldUrlValue TextFieldHyper = new SPFieldUrlValue();
      TextFieldHyper.Url = currWebApp + "/Lists/CustList1/AllItems.aspx?FilterField1=DocName&FilterValue1=" + ws.Cells[i, 3].Value;
      TextFieldHyper.Description = ws.Cells[i, 3].Value.ToString();
      item[column[j]] = TextFieldHyper;
      item.Update();

    The value of ws.Cells[i, 3].Value is "1:16cv7229". The field ws field 3 DocName.

    Thursday, January 12, 2017 2:26 AM
  • Hi,

     

    What’s the field value( encoded or not)?

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, January 12, 2017 4:43 AM
  • Thanks Lee. The field value is not encoded. Its a text field. I verified it returns the exactly the same way in your screenshot. However when I click on the List item hyperlink, it shows FilterValue1%3D%250A1%253A15cv12730%250A instead of actual value. Its strange.

    Thanks

    Wednesday, January 18, 2017 12:06 AM
  • Hi,

    What’s the browser you’re using? If you’re using IE, what’s the version?

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, January 18, 2017 1:51 AM
  • Its Internet Explorer 11

    Thursday, January 19, 2017 6:59 PM
  • Hi,

     

    Could you try to install the SharePoint 2013 September 2014 Cumulative Updates CU and check?

    Here is one similar thread for your reference.

    https://thesharepointfarm.com/2014/06/workaround-ms14-022-double-encoding-bug/

     

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, January 20, 2017 9:30 AM
  • Since I have SharePoint 2013 with Service pack 1 and I also applied June 2016 CU (15.0.4833.1000) which covers the CU mentioned in your message. Do you think I can update even recent CU and try?

    Thanks

    Shri

    Friday, January 20, 2017 5:52 PM
  • Also, This list was upgraded from SharePoint 2010 environment(with upgrade content database webapp). I believe this has nothing to do as its very cleanly upgraded. If I create a new test list and try to filter, it doesn't adds any other format in the FilterField1 value.

    Friday, January 20, 2017 5:58 PM
  • I think its still converting some special values. I created a test custom list and filter the value but its adds special characters or conversions as you can see in the picture below:

     
    Friday, January 20, 2017 6:07 PM
  • Hi,

     

    From your last screenshot, seems SharePoint default filter working fine(no double encoding issue)?

    So, the issue happened only for your custom filter link?

     

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, January 23, 2017 10:09 AM
  • The issue is even on the screen I shown above.

    If I type http://spportal/List/clist/allitems.aspx?FilterField1=Docket&FilterValue1=1:345cdse78

    return 'no record found'. Where as the value 1:345cdse78 still there. I can manually filter if I click docket. I was trying to show that the filter value in the url navigation is encoded instead of actual value.

    Please advise

    Monday, January 23, 2017 6:00 PM
  • I believe the issue is with the value of the field. The text field value doesn't like ":" for filtering. I verified if there is a plain text, it filters out correctly with the url ~allitems.aspx?FilterField1=Title&FilterValue1=Test

    I added somemore plan text in the Docket as value and I was able to filter. However I only receive the Docket value with ":". Is there a way to apply some hidden calculated field to skip this ":" from the value?

    I also tried using with "%5Fx003a%5F" for ":" but filter doesnot work correctly.

    Please advise.

    Monday, January 23, 2017 8:09 PM
  • Hi,

     

    We could use replace function to replace character ‘:’, here is the sample code.

    =REPLACE(data,INT(FIND(":",data)),1,"")

     

    Best Regards,

    Lee


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    • Marked as answer by ShriG Wednesday, February 8, 2017 11:28 PM
    Friday, February 3, 2017 8:46 AM
  • Thanks Lee.

    this worked and using this as a hidden field to filter and we don't have to use the javascript filter url stuffs now.

    Wednesday, February 8, 2017 11:28 PM
  • Hi ShriG,

    I have the same issue, please help me.

    The following code was working in 2010, but not in 2016.

    url = "/Lists/Mylist/" + $(this).attr('projtype') + ".aspx?FilterField1=CustNum&FilterValue1=" + $(this).attr('cust');

    Can you please provide the 2016 code?


    Cheers. Happy troubleshooting !!! Sriram E - MSFT Enterprise Project Management

    Monday, October 1, 2018 1:48 AM
  • are you still looking?

    Create a calculated field and generate the value for the filter. You don't have to associate in views though. You can then easily filter. let me know if you need more assistance.

    Tuesday, October 23, 2018 5:29 PM