It's all about the answers!

Ask a question

resetting a variable in EWM(RTC)


jim Stevens (1213) | asked Sep 02 '22, 3:41 p.m.

 HI

Is it possible to Clear a required variable when the state is changed.
example 
A defect has a variable set to good because it was required on creation. Then the state changes from open to In Progress and we want to clear the variable with the value of good and require the person to select a new value.
Is this possible with Java script?

thank you 
Jim

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Sep 12 '22, 4:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 The JavaScript API, unfortunately does not provide a good mechanism to detect a state change. It might be possible to implement something using custom attributes and a calculated value to store the current state and use that to detect the state change to determine when to set the custom attribute value. 


It is possible to write a server extension (called a follow-up action or participant) that detects the state change and changes the attribute value, but this would be performed after the state change and not in the UI. It would not really work, if the attribute value is required, because the precondition would prevent setting the value. 

I do not see a good approach to achieve that and I do not think it is a good idea to implement such a workflow. I would consider to use two attributes to implement such a business logic.    

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.