How to use cascading Lookup

This tutorial shows you how to use cascading Lookup components on forms. In our example we will make a page for checking product availability. On our form we have Singleselect component with Product category items, and we have Lookup component which will show only Products from selected Product category.

Cascading lookup example

1. Login into developer panel.

2. Navigate to Pages menu item.

3. In our example, we have single select component on form which is filled with Product category entity data (check out tutorial How to use entity data source in singlection componet).

Cascading lookup single select

4. Drag and drop Lookup component to FormCheckAvailability.

5. In component properties section, select SQL code as Data source type. Click on textarea under Data source SQL label and enter SQL code. Result of SQL query should return data from database with Id as first column. First column will be value of lookup option. In our example we will return every product that is in Product category which we select before in single select component (i.e. SELECT Id, Name FROM Product WHERE Product_category_Id={SingleselectCategoryCheckAvailability};).

Cascading lookup component

6. Click on Save changes button, go into your application and check out the results.