Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confiforms: Need Help with nested asFilteredBy (smart multi-selects)

Jan Sürmeli
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 25, 2022

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.

 

2 answers

0 votes
Alex Medved _ConfiForms_
Community Champion
July 31, 2022

Hi

Let me try to help you here... But this one is very tricky as it has multi-value having another multi-value field and those are not simple values, but the smart fields... so

So a "view" over "Customers" form with the filter expression to be something like

customerCars.transform(carInsurances.transform(insuranceStatus.id).asList):*1*

Hope it helps

Alex

0 votes
Srinatha Tondihal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 25, 2022

Hi @Jan Sürmeli ,

Welcome to community. 

I would recommend you to write to Coniforms support also as they might have a solution handy for you. 

https://marketplace.atlassian.com/apps/1211860/confiforms-data-forms-workflows?hosting=cloud&tab=support 

Mean while if any of our community members are aware of this , they will also try to help here. 

Have a good day!

Thanks,

Srinath T

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events