Profile Picture

Query String

Posted By xeksimus 7 Years Ago
You don't have permission to rate!
Author
Message
xeksimus
Posted 7 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Awaiting Activation
Last Active: 7 Years Ago
Posts: 2, Visits: 4
Hi there.
I am using a List Filter Plus Web Part to search in a custom list  which is working fine.

Does a List Filter Plus Web Part can receive a query string parameter to filter a list?
Igor
Posted 7 Years Ago
View Quick Profile
Supreme Being

Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)

Group: Administrators
Last Active: 3 Years Ago
Posts: 415, Visits: 592
Hi,

The List Filter web part support the following querystring parameters format:
KwizFilterField[i]=[Name of the filtered field]&KwizFilterValue[i]=[Value]

You can find detailed instructions in the ListFilterPlus web part User Guide: http://www.kwizcom.com/objects/ListFilterPlus/v4.2/SharePoint_List_Filter_web_part_User_Guide.pdf

You should check section "Configuring filter values in run-time using querystring parameters" (p28).

Thanks,

Igor,
KWizCom 
briholland
Posted 7 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 2, Visits: 12
Hi Igor,

I found this thread about query string that could set the filter's parameters.  I read the user guide and followed it but the parameters I'm trying to set through the query string are not being set.  I'm hoping you can help me.

The page consists of:

  1. a CEWP containing only text (no CSS, no handcrafted HTML)
  2. the List Filter Plus (v4.2.00)
    • Field 1: Fund Manager
    • Field 2: Fund Name
    • Field 3: APIR Code
    • Field 4: Sector
  3. the list to be filtered
The page works fine: the list displays and the user can enter values in the filters and the list filters correctly.  However, I'm investigating the use of a query string to this page (let's call it Page B), as I want to pass user-input values from Page A to Page B, which will prepopulate and execute the filters on Page B.

I'm first trying by manually adding the query string in the browser; however, the filters in the resulting page are unaffected.  If they're empty, they remain empty.  If they're already populated, the values are not overridden.  This is the format of the URL I'm trying, which I copied the parameters from the user guide:

http://XXXX.com/Home/MF/PP/Pages/default.aspx?KwizFilterField1=Sector&KwizFilterValue1=Equ
  • ?KwizFilterField1=Fund Manager&KwizFilterValue1=XXX
  • ?KwizFilterField1=FundManager&KwizFilterValue1=XXX
  • ?KwizFilterField1=Fund+Manager&KwizFilterValue1=XXX
  • ?KwizFilterField1="Fund Manager"&KwizFilterValue1=XXX
  • ?KwizFilterField1='Fund Manager'&KwizFilterValue1=XXX
  • ?KwizFilterField1=Sector&KwizFilterValue1=XXX
  • ?KwizFilterField4=Sector&KwizFilterValue4=XXX
Am I doing something wrong in the string query or in the page?  Is there some other configuration that needs to be setup?  Any thoughts?

Many thanks,
Brian.
Igor
Posted 7 Years Ago
View Quick Profile
Supreme Being

Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)Supreme Being (415 reputation)

Group: Administrators
Last Active: 3 Years Ago
Posts: 415, Visits: 592
Hi,

You need to use the InternalName of the field which you want to filter. To get it go the the field settigns page and you can find it in the URL (see image below). Int the image you can see that the Internal Name of the field "Fund Manager" is "Fund_0020_Manager" (You need replace "%5Fx" with "_")

http://forum.kwizcom.com/Uploads/Images/bb6455db-9db1-4056-bb80-1af3.png

Thanks,

Igor,
KWizCom 
briholland
Posted 7 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 7 Years Ago
Posts: 2, Visits: 12
Hi Igor,

Thanks so much.  That's much clearer and worked a treat!

A couple of points to note:
  • "Fund_0020_Manager" (You need replace "%5Fx" with "_")
    The field was "Fund_x0020_Manager".  Only %5F, not %5Fx, should be replaced with an underscore.  The "..._x0020_..." should remain in the URL.
  • Filters not mentioned in a URL will continue to be populated with their previous value.  To clear them, you need to specify them in the URL and set their value to %20 (i.e. a space).
My final test URL that worked very well was (all on one line, of course):

http://XXXX.com/Home/MF/PP/Pages/default.aspx?KwizFilterField1=Fund_x0020_Manager&KwizFilterValue1=%20&KwizFilterField2=APIR_x0020_Code&KwizFilterValue2=Int&KwizFilterField3=CCD_Sector&KwizFilterValue3=Eq

That is:

http://XXXX.com/Home/MF/PP/Pages/default.aspx?
KwizFilterField1=Fund_x0020_Manager&KwizFilterValue1=%20&
KwizFilterField2=APIR_x0020_Code&KwizFilterValue2=Int&
KwizFilterField3=CCD_Sector&KwizFilterValue3=Eq


Thanks again,

Brian.


Similar Topics