Clear a Lookup Filter

Hi Guys,

I’m fairly sure this one is simple but I just can’t seem to get it, we have a Lookup that is dynamically filtered from another Lookup, the filtering is working great however we want the second Lookup to be Unfiltered if the first Lookup is empty.

On first Load we can ignore the first Lookup and the second Lookup is unfiltered, if we then select an item in the first Lookup it dynamically filters the second, great, if we change the choice the filtering changes, great. But if we clear the Lookup choice in the first, the second stays filtered to the last selected choice, we want this to revert to unfiltered, I was thinking something along the lines of: -

fd.field('Product_x0020_Code').filter = 'Equipment_x002f_Service_x0020_TyId eq *';

But this doesnt do it.

Thanks

Dear Tony,

Please try the following code:

fd.field('Product_x0020_Code').filter = "";
fd.field('Product_x0020_Code').widget.dataSource.read();
1 Like

Hi Alkex,

That worked well.

Thanks