📜 ⬆️ ⬇️

Filtering SharePoint lists, address bar settings

Foreword



What to do? Below the cut are a number of useful parameters of the address bar of SharePoint lists, which can partly save the situation.

Solution options


In fact, there are several solutions to the problem:


These options in the context of staging are not quite appropriate, it is possible and easier.
And here we come to the essence of this post. Enumeration of the filtering capabilities of lists by standard means due to the parameters of the address bar.

List Address Bar Parameters


1. The most obvious - View - opens the list with the view, the GUID of which is passed to the parameter.
')
Example: /Lists/BigList/AllItems.aspx? View = {50AEF4A1-28AD-4114-A074-C72A0FFCA785}

2. FilterField , FilterValue - a pair of parameters for specifying an attribute (the internal name of the filtered field) and its exact value.

The number of pairs of these parameters can be unlimited, as long as the FilterField index is the same as the FilterValue index.
The index in this case is the number. For example, FilterField1 = ... FilterValue1 = ... FilterField7777 = ... FilterValue7777 = ...
If 2 or more different FilterFields take the same value, then the last one will be relevant, and the previous one will be ignored.

Example: /Lists/BigList/AllItems.aspx?View={50AEF4A1-28AD-4114-A074-C72A0FFCA785}& FilterField1 = Status & FilterValue1 = New & FilterField2 = Author & FilterValue2 = <initiator name>

3. SortField , SortDir - sort order. SortField = <Internal field name> & SortDir = <Sort order, Desc / Asc>

So far it is pretty obvious and easy to find on the same technet , but we want more. And more partially there.

4. We want to filter the fields not only by hard coincidence.

FilterOp - overrides the default comparison (exact match - Eq). Comes with FilterField, FilterValue.
Can apply comparison values ​​from CAML:


Example: /Lists/BigList/AllItems.aspx?View={50AEF4A1-28AD-4114-A074-C72A0FFCA785}&FilterField12=NumAccount&FilterValue12=087& FilterOp12 = Contains

A fly in the ointment - if you need to filter by the interval, for example, the period from 12/01/2013 to 12/16/2013, then this, alas, will not succeed. Since This will filter the attribute with the maximum index. You can of course the same date attribute on the 2nd attribute, but this is already aesthetically not beautiful, although it is possible.

5. We want to compare the value of the attribute with multiple options.

FilterName , FilterMultiValue - help us: FilterName - takes the value of the internal field name, FilterMultiValue - gets the list of values ​​separated by ";".

Example: /Lists/BigList/AllItems.aspx?View={50AEF4A1-28AD-4114-A074-C72A0FFCA785}& FilterName = ID & FilterMultiValue = 15460; 15459; 15458

True, filtering 2 different attributes by multiple values ​​will fail again. It is necessary to combine a dynamic filter and a filter inside the view.

I hope the information will be useful. Since it is not easy to find out about the presence of some of the parameters on the fly.

Source: https://habr.com/ru/post/206230/


All Articles