The 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.
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!