Assume I have three forms: Customers, Cars, Insurance.
In Customers, I have fields "customerName" (string) and "customerCars" (smart multi-select to Cars)
In Cars, I have fields "carName" (string) and "carInsurances" (smart multi-select to Insurances)
In Insurances, I have fields "insuranceName" (string) and "insuranceStatus" (dropdown 1:active, 0:inactive).
Now, what I would like to do is create a TableView on "Customers", that
(1) Shows only customers that have at least one car with at least one active insurance.
(2) has a column "insuredCars" showing only the cars of that customer that have active insurance.
For (1), I can solve this by using the filter "!customerCars.carInsurances.asFilteredBy(insuranceStatus:1):[empty]", or what I also found working, but less intuitive: "customerCars.carInsurances.insuranceStatus:*1*"
For (2), I am somewhat out of ideas. I believe it could be possible with "asFilteredBy". So, I would suspect to start with customerCars.asFilteredBy(...)? Is that the right direction?
Every input on the problem would be very appreciated.