How to set Boolean attribute value using calculated value script
Accepted answer
Just return a boolean variable or the result of a evaluation.
For instance,
var state= workItem.getValue(WorkItemAttributes.STATE); return (state === "3" || state === "4");
Comments
Hi @Gabriel,
I have the same requirement as Balamurugan mentioned, but i think it wont set the attribute value though it returns the state. Please correct me if i am wrong.
You are wrong. The comparison returns a boolean, the or operation on two booleans returns a boolean. You could also return true or false. SeeĀ https://www.w3schools.com/js/js_booleans.asp