How to filter a list lookup by multiple values (or CAML Query)

  • 7 December 2015
  • 3 replies
  • 135 views

Badge +2

Hi,

I would like to filter a list lookup by multiple values. There are several disuccions about this topic but no one fits into my solution.

Basicaly we have a data structure like a tree:

1 -+

     |

     +- 1.1 ---+

     |              |

     |             +- 1.1.1

     +- 1.2

     |

     +- 1.3

Now I want to filter the lookup based on the level in the structure. If I navigate to 1.1, I want to filter the lookup for each data under this level. I have all data in place, but I cannot attach multiple values to the list lookup filter (Control Settings->Filtering->Filter available selections->By aspecific value). It is not possible to use some kind of or-statemants like || or the or-function of Nintex.

A CAML Query would be the nicest solution:

  <Where>

         <BeginsWith>

            <FieldRef Name='FIELDNAME' />

            <Value Type='Text'>1.1</Value>

         </BeginsWith>

   </Where>

Can I assign a CAML Query to the filtering manually by JavaScript or is there any other kind of solution for this problem? I really don't want to build up the control manually by HTML and JavaScript...


3 replies

Userlevel 6
Badge +16

Try it first on a CAML tool, for example >>> SharePoint CAML Query Helper for 2007, 2010, 2013, Office 365 SharePoint Online - Home

Badge +2

The CAML-Query works fine, the only problem is to get this caml attached to the "List Lookup" control.

Userlevel 5
Badge +9

Unfortunately you can do it in List View control, but not in List Lookup control.

You can add your vote here to request this functionality :

More advanced filtering for connected lookup controls – Customer Feedback for Nintex

Reply