Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

I've gone through some articles, knowing that I can use querystring to filter a list web part:

https://msdn.microsoft.com/en-us/library/cc751316.aspx http://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-fieldhttps://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-field

Currently I have a list web part with a date type column, let's say "Created". Now I would like to filter that column by a date range (e.g. From 2016-12-02 To 2016-12-02), so the querystring that I made was: http://example.com/MySite?FilterField1=Created&FilterValue1=2016-12-02&FilterOp1=Geq&FilterField2=Created&FilterValue2=2016-12-02&FilterOp2=Leq

There are only two records in the list which is created on 1st December.However, the search result is showing all records (Expected no records will be shown).

How to fix this problem? Or should I say, I cannot apply multiple filter condition to a single column?

I thought of customizing the SelectCommand of the list view to add the condition manually, however, this lead to another issue: Sometimes the user would like to filter by the "Title" column and sometimes they just click search button. See screenshot below:

enter image description here

I searched on the web and they said CAML is unable to add condition dynamically (i.e. if "Title" textbox is empty, the list web part will be empty too).

Is there any alternative solution to both situations?

Since I'm using Sharepoint foundation, there's no "Filter web part" for me to use.

I've gone through some articles, knowing that I can use querystring to filter a list web part:

https://msdn.microsoft.com/en-us/library/cc751316.aspx http://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-field

Currently I have a list web part with a date type column, let's say "Created". Now I would like to filter that column by a date range (e.g. From 2016-12-02 To 2016-12-02), so the querystring that I made was: http://example.com/MySite?FilterField1=Created&FilterValue1=2016-12-02&FilterOp1=Geq&FilterField2=Created&FilterValue2=2016-12-02&FilterOp2=Leq

There are only two records in the list which is created on 1st December.However, the search result is showing all records (Expected no records will be shown).

How to fix this problem? Or should I say, I cannot apply multiple filter condition to a single column?

I thought of customizing the SelectCommand of the list view to add the condition manually, however, this lead to another issue: Sometimes the user would like to filter by the "Title" column and sometimes they just click search button. See screenshot below:

enter image description here

I searched on the web and they said CAML is unable to add condition dynamically (i.e. if "Title" textbox is empty, the list web part will be empty too).

Is there any alternative solution to both situations?

Since I'm using Sharepoint foundation, there's no "Filter web part" for me to use.

I've gone through some articles, knowing that I can use querystring to filter a list web part:

https://msdn.microsoft.com/en-us/library/cc751316.aspx https://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-field

Currently I have a list web part with a date type column, let's say "Created". Now I would like to filter that column by a date range (e.g. From 2016-12-02 To 2016-12-02), so the querystring that I made was: http://example.com/MySite?FilterField1=Created&FilterValue1=2016-12-02&FilterOp1=Geq&FilterField2=Created&FilterValue2=2016-12-02&FilterOp2=Leq

There are only two records in the list which is created on 1st December.However, the search result is showing all records (Expected no records will be shown).

How to fix this problem? Or should I say, I cannot apply multiple filter condition to a single column?

I thought of customizing the SelectCommand of the list view to add the condition manually, however, this lead to another issue: Sometimes the user would like to filter by the "Title" column and sometimes they just click search button. See screenshot below:

enter image description here

I searched on the web and they said CAML is unable to add condition dynamically (i.e. if "Title" textbox is empty, the list web part will be empty too).

Is there any alternative solution to both situations?

Since I'm using Sharepoint foundation, there's no "Filter web part" for me to use.

replaced http://sharepoint.stackexchange.com/ with https://sharepoint.stackexchange.com/
Source Link

I've gone through some articles, knowing that I can use querystring to filter a list web part:

https://msdn.microsoft.com/en-us/library/cc751316.aspx http://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-field

Currently I have a list web part with a date type column, let's say "Created". Now I would like to filter that column by a date range (e.g. From 2016-12-02 To 2016-12-02), so the querystring that I made was: http://example.com/MySite?FilterField1=Created&FilterValue1=2016-12-02&FilterOp1=Geq&FilterField2=Created&FilterValue2=2016-12-02&FilterOp2=Leq

There are only two records in the list which is created on 1st December.However, the search result is showing all records (Expected no records will be shown).

How to fix this problem? Or should I say, I cannot apply multiple filter condition to a single column?

I thought of customizing the SelectCommand of the list view to add the condition manually, however, this lead to another issue: Sometimes the user would like to filter by the "Title" column and sometimes they just click search button. See screenshot below:

enter image description here

I searched on the web and they said CAML is unable to add condition dynamically (i.e. if "Title" textbox is empty, the list web part will be empty too).

Is there any alternative solution to both situations?

Since I'm using Sharepoint foundation, there's no "Filter web partFilter web part" for me to use.

I've gone through some articles, knowing that I can use querystring to filter a list web part:

https://msdn.microsoft.com/en-us/library/cc751316.aspx http://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-field

Currently I have a list web part with a date type column, let's say "Created". Now I would like to filter that column by a date range (e.g. From 2016-12-02 To 2016-12-02), so the querystring that I made was: http://example.com/MySite?FilterField1=Created&FilterValue1=2016-12-02&FilterOp1=Geq&FilterField2=Created&FilterValue2=2016-12-02&FilterOp2=Leq

There are only two records in the list which is created on 1st December.However, the search result is showing all records (Expected no records will be shown).

How to fix this problem? Or should I say, I cannot apply multiple filter condition to a single column?

I thought of customizing the SelectCommand of the list view to add the condition manually, however, this lead to another issue: Sometimes the user would like to filter by the "Title" column and sometimes they just click search button. See screenshot below:

enter image description here

I searched on the web and they said CAML is unable to add condition dynamically (i.e. if "Title" textbox is empty, the list web part will be empty too).

Is there any alternative solution to both situations?

Since I'm using Sharepoint foundation, there's no "Filter web part" for me to use.

I've gone through some articles, knowing that I can use querystring to filter a list web part:

https://msdn.microsoft.com/en-us/library/cc751316.aspx http://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-field

Currently I have a list web part with a date type column, let's say "Created". Now I would like to filter that column by a date range (e.g. From 2016-12-02 To 2016-12-02), so the querystring that I made was: http://example.com/MySite?FilterField1=Created&FilterValue1=2016-12-02&FilterOp1=Geq&FilterField2=Created&FilterValue2=2016-12-02&FilterOp2=Leq

There are only two records in the list which is created on 1st December.However, the search result is showing all records (Expected no records will be shown).

How to fix this problem? Or should I say, I cannot apply multiple filter condition to a single column?

I thought of customizing the SelectCommand of the list view to add the condition manually, however, this lead to another issue: Sometimes the user would like to filter by the "Title" column and sometimes they just click search button. See screenshot below:

enter image description here

I searched on the web and they said CAML is unable to add condition dynamically (i.e. if "Title" textbox is empty, the list web part will be empty too).

Is there any alternative solution to both situations?

Since I'm using Sharepoint foundation, there's no "Filter web part" for me to use.

Tweeted twitter.com/StackSharePoint/status/825688918599299073
Source Link
User2012384
  • 173
  • 1
  • 11

How to add multiple condition filtering in query string to list view

I've gone through some articles, knowing that I can use querystring to filter a list web part:

https://msdn.microsoft.com/en-us/library/cc751316.aspx http://stackoverflow.com/questions/24702889/sharepoint-filtering-list-with-multiple-values-of-the-same-field

Currently I have a list web part with a date type column, let's say "Created". Now I would like to filter that column by a date range (e.g. From 2016-12-02 To 2016-12-02), so the querystring that I made was: http://example.com/MySite?FilterField1=Created&FilterValue1=2016-12-02&FilterOp1=Geq&FilterField2=Created&FilterValue2=2016-12-02&FilterOp2=Leq

There are only two records in the list which is created on 1st December.However, the search result is showing all records (Expected no records will be shown).

How to fix this problem? Or should I say, I cannot apply multiple filter condition to a single column?

I thought of customizing the SelectCommand of the list view to add the condition manually, however, this lead to another issue: Sometimes the user would like to filter by the "Title" column and sometimes they just click search button. See screenshot below:

enter image description here

I searched on the web and they said CAML is unable to add condition dynamically (i.e. if "Title" textbox is empty, the list web part will be empty too).

Is there any alternative solution to both situations?

Since I'm using Sharepoint foundation, there's no "Filter web part" for me to use.