<img height="1" width="1" src="https://www.facebook.com/tr?id=730305433807073&amp;ev=PageView &amp;noscript=1">
Book a Demo

Advent Calendar Door 21: Creating cascading lookups in SharePoint

Creating cascading lookups in SharePoint

A classic in today’s skybow Advent Calendar: creating cascading lookups with SharePoint and SharePoint Online. While in the past it usually meant fiddling with custom JavaScript, or even buying separate components just for that, with skybow Solution Studio and skybow Rich Forms it is an integrated functionality which is very easy to use.

What is a cascading lookup in SharePoint terminology? Simply, it’s a lookup which will be filtered dynamically by any other value, including the value of another field in the same form. A classic here is Country/State lookup: based on selected value in the dropdown “Countries”, different states/regions should be dynamically shown in the “Regions” dropdown.

Of course, the “Regions” lookup field needs to have a property which is matching to the value we are filtering on. In this case, our “Regions” List has a lookup field “Country”, where the related country is referenced.

SharePoint Lists - creating a lookup

The next we need to do is to open the “Filter” behavior in the “Behaviors” tab of the field which you want to filter, in our case the “Region” field, and to set the filter itself.

Not that the field could be filtered by a fixed value, by a skybow Expression (you could do any kind of weird filtering here – for examples users from one SharePoint group might see different drop-down values than users in another SharePoint group), or, as in our case, based on the value of the other field in the same form – on our case, the “Country” field.

Query Editor create cascading lookup

When you save this, and run the form, you will notice how available values of the “Region” field are changing based on the selected value of the “Country” field.

You could even make this form even more dynamic, and set the “Region” field invisible unless the “Country” field is selected, and then, if it visible, you could make it a required field, and filter it based on the “Country” selection, as shown here.

Cascading Lookups customization

And all this was achieved in less than a minute. Because skybow. :)


Adis Jugo

Written by Adis Jugo

is Director of Product Technology at skybow, and a software architect with over 20 years of experience. Adis is double Microsoft MVP (Most Valuable Professional) for Office Development and for Office Servers and Services. He first met SharePoint (and Microsoft CMS server) back in 2002, and since 2006 his focus was completely shifted towards architecture and development of productivity solutions, now based on the Azure, Office 365 and SharePoint technologies. Adis is an internationally recognized speaker with over 15 years of speaker experience, speaking at various Microsoft, Community and SharePoint/Office 365/Azure conferences worldwide.