Flter Lookup - disable if no items returned

Hello guys,

I did this and it works great:

But, when initializing the form I keep one field (the filtered one) disabled until the "parent" is changed.
When the parent change, the child is being loaded and filtered. If none is loaded, it looks like this:

When some items fulfil the filtration:

I am trying somehow to catch the event when the filtered data are returned. the goal is to keep the "child" disabled, until it has some data returned.

Is it possible to do it?
I tried this approach, did not help because it is not changed.

fd.field("vChild").$on("change",(selectedChild) {
// WHATEBER IS HERE, when data is returned or none, nothing happens
})
// So I cannot probably check the field if it is changed or not when loading data - makes sense

Thank for advice
Stepan

Hi @StepanS,

I'm afraid there is no simple way to achieve this at the moment. You could get the "child" list with a PnP request and apply the same filtering to it, then check the length of the result. This will increase loading times, but I can't suggest a better solution.

1 Like

Thanks @IliaLazarevskii , I got it. I want to use your features in Plumsail Designer which you offer and not everything mine which could be slower due to loading data to data fields :slight_smile:

Ok, cannot be done is also the answer.
Thanks
Stepan

1 Like