UI Action Condition based on Short Description

jxa7987
Tera Expert

I have a UI Action that needs only to be available based on the Short Description. Below is the Condition, the button should not show if the Task Description contains Development and Analysis but it doesn't work. Please help. Thanks. 

 

current.state != 3 && ( current.short_description.indexOf('Development') == -1 || current.short_description.indexOf('Analysis') == -1)

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

Change the condition to '!= -1 '

View solution in original post

2 REPLIES 2

Kalaiarasan Pus
Giga Sage

Change the condition to '!= -1 '

Sebastian R_
Kilo Sage

Do you mean that both "Development" and "Analysis" should not be part of the description or only one of them?

If the button should not be visible for a description "Development not working" or "Analysis has to be done" then you need the following description. (Keep in mind that the UI Action condition is only checked on load and not if the short description changes).

current.state != 3 && current.short_description.indexOf('Development') == -1 && current.short_description.indexOf('Analysis') == -1