How to set Display Depends on for multiple options?

Hello Everyone,

I am working on customization from GUI only. I want make a Custom Field visible if one of some options is selected from previous field.

Existing Field -
Select Profile (name of field is profile and options are Employee, Customer, Distributor, New Customer, New Distributor)

I want Birthday to be visible only when one of first three options is selected.

I am able to set it for single rule / condition.

eval:doc.profile == ‘Employee’
eval:doc.profile == ‘Customer’
eval:doc.profile == ‘Distributor’

When I give any one of the above mentioned rules, it is implemented but how to make it viscible if anyone of the option is selected? I want rule for multiple options

Regards

4 Likes

@parmartejas,

you can try or operations to your conditions

e.g. eval:doc.profile == 'Employee' || doc.profile == 'Customer' || doc.profile == 'Distributor'
alternate way to achive this is to use frappe’s inList method.

e.g. eval: inList(["Employee", "Customer", "Distributor"], doc.profile)

10 Likes

Dear @makarand_b,

I have set up this [quote=“makarand_b, post:2, topic:22654”]
eval: inList([“Employee”, “Customer”, “Distributor”], doc.profile)
[/quote]

It worked,

Thanks!

2 Likes