Depends on within a doctype

Hi all,
I have created a doctype with several fields.
Let’s say Field1 is of type Select with option A, option B, option C, and option D.
I have created Field2 of type Table.
Question: what should i write in the “depends on” box to have Field2 to only display if Field1 is Option A or Option B?

I have tried:
eval:in_list([“Option A”, “Option B”], Field2)
eval:Field2==“Option A”||eval:Field2=="Option B
… without success

Any suggestion?

Thanks

@Francois_Ifitwala Please post the exact text.

should be:

eval:in_list(["Option A", "Option B"], doc.field2)
1 Like

Great … now it works. I was forgetting the “doc.” before the field2.

Thanks Rushabh.