You have a screen with two drop-down boxes and you need to filter the second based on data selected in the first one.
You have these two fields on the screen:
When you select a category you then want to select only products in that category.
Create a filtered lookup
a) Create a filter on the
b) Right-click on the
Productentity and select Actions > Create Lookup.
c) Name the lookup
d) Select the
GetByCategoryIdin the List Filter and finish the wizard.
Productdrop-down based on this lookup will expect a
Product_parCategoryIdparameter when the dropdown part is opened.
Add entity field dependency
You need to tell the front-end that the fields will be actually cascading. For this you need to create a dependency between the fields. When the
Categoryfield’s value changes, the
Productfield will reset, expecting you to enter a new value.
a) Right click on the dependent
b) Select New > Dependency
c) Select the
Select the lookup in the drop-down in the screen designer
a) Open the screen section
b) Select the
Productdrop-down (or put it to the section if it is not there yet)
c) Go to Properties (F4) and check that the Lookup property is set to your filtered lookup
d) Now go to the ParameterMappings property and click on […]
e) You will see the
d) Put the category’s field name in the ColumnName, in this case
This way you tell the
Productdrop-down that it should use the value from the
Categoryto filter the products.