Conditional Field Contains

Hello!
In Sales Order Item doctype I want a field to become visible only if item_name contains “Chandelier” word.
What should I insert in “Depends On” field?

Thanks!

eval:("Chandelier" in doc.item_name)

Please note that this is case-sensitive. To allow both cases, use or operator.

Sorry, doesn’t work

Hi,

Please try this:

eval:(doc.item_name.indexOf("Chandelier") !== -1)

It works!!! you are the best!!!

1 Like