Filtering in a Sitecore 7 Multilist with Search or Treelist with Search

MumblesThe new “with Search” fields in Sitecore 7 offer a great way for users to select items from a large list of options. One problem is that these new fields have a lot of hidden potential that is not (yet) documented very well.

The Source

It seems that all of the advanced control that a developer has over these fields is hidden in the “Source” property. Rather than spew a lot of words at you, I’ll dive right in to the values and some examples.

Filter (Multilist with Search only)

Expected to be a colon/pipe delimited list of key-value pairs. As of Sitecore 7.0.0 rev. 130810, it doesn’t do anything except enable the advanced filtering options listed below. If this value is omitted or blank, then the advanced filtering rules below are ignored.


This does not apply to the Treelist with Search.
UPDATE: As of Sitecore 7.1 rev. 140130, this arbitrary filter is not necessary. Instead, you need to either provide a valid filter (in the form of a lucene query, e.g. “_content:*iceland*”), or omit this parameter.
UPDATE: As of Sitecore 7.2 rev. 140314, Treelist with Search has been deprecated. Going forward, you will need to use Multilist with Search instead.


Filters all search results by the given template:



Sets the number of items to be displayed on each page of search results (defaults to 10)



Sets the field used to sort the results.



Restricts results to only the specified language.


UPDATE: Mark has pointed out in the comments that Sitecore 7.2 (and maybe others) require the full name of the language here (e.g. “english”), but be warned that the full name of a language can be different based on the backend language. Mark suggests (and I agree) that you should use “&Filter=_language:en” instead.


This is one of the most interesting options. This indicates a parent node, and only results beneath this node will be returned.


Even more interesting, is that you can specify a query here!


Important! Any equal signs in the query should be changed to “->” to avoid parsing errors. Sitecore will interpret these as normal “=” when it executes the query.

Closing and a word of caution

I found this most useful in a multi-site install I am working with. Templates are shared between sites, but I only wanted the users to be able to choose items from the site they were editing.

Be warned! The apparent inconsistencies and lack of documentation makes me think that this functionality may change in future releases. Use with caution, and re-test your filters if you upgrade in the future!

10 Responses to “Filtering in a Sitecore 7 Multilist with Search or Treelist with Search”

  1. Mark

    Watch out when using the &Language= param. In Sitecore 7.2 it only accepts full names of the language i.E “english”. We found though that the full name of the languages can vary according to the Sitecore backend language. That’s why it’s better to use &Filter=_language:en instead.

  2. piyush

    Hi Patrick,

    Is there way to pick the latest version of the item and default the language to the items language. For example I have an item “ABC” with two version in English and one in Chinese. When i search the treelist with search control on a Chinese item, i get all the above 3 versions with no other information on what is what. Instead i would expect the a query that would return me version 1 of the Chinese item.

    • Patrick

      Hmm. That is an interesting question. Unfortunately, the data source is not tied to the item’s language.

      I do not think it is possible to use the language of the item you are editing as part of the filter, and I know that adding different language versions of your template doesn’t allow each language to have different “source” values, so that won’t work either.

      I think the only solution might be to have separate data templates, and explicitly filter by language in your data source definition.

  3. Henning Kilset

    Where do you specify these in the source field? After the source starting point, (in my case ‘/sitecore/content/sitename/basedata/category’ with a special delimiter?

    • Patrick

      You will need to change your starting point to the item Guid, instead of the path, and use it as the StartSearchLocation.

      Let’s assume your “category” item has the id “{FEC8EFEE-3BA2-40B7-95AC-32D59AEC3F63}”.

      In the Source property, instead of this:

      It would be something like this:

      • Patrick

        I just tried it, and this also works in Sitecore 7.1 (in case you don’t want to use the Guid):



Leave a Reply