Conditional Field Contains

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?


eval:("Chandelier" in doc.item_name)

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

Sorry, doesn’t work


Please try this:

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

1 Like

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

1 Like