Filter lookup values by other field

@korchev,

Could you kindly give some more details of this process? I am trying to create Cascading DropDowns in one Form, for a task Category and Subcategory.

I followed the method mentioned here Best way to interact (hide/disable/enable/fill programmatically) with client forms fields/components to set the Visibility (the values are hard-coded right now but I hope that can be refined later).

To filter the Subcategory Lookup by ParentCategoryID matching the value of the CategoryID Dropdown, I first tried setting the Page Load of getTaskSubcategories with $filter ParentCategoryID eq ${myForm.CategoryID} and that completely broke the Visibility test (the field never displayed).

Then I tried adding a Set Parameter to the Change event of the form and named it SelectedCategoryID with a value of ${myForm.CategoryID} and setting the Page Load of getTaskSubcategories with $filter ParentCategoryID eq ${SelectedCategoryID} but that didn’t work either.

Any help would be greatly appreciated.
Chadrick