It's all about the answers!

Ask a question

How to calculate a value on state change?


Franca Zober (153) | asked Jan 15, 2:14 a.m.

 Hi all,


I would like to change some specific attributes based on a state change. 

My problem is that while I can change attributes based on the change of other attributes through calculated values and cannot figure out how to make it dependent on the state change. If I write a script and link it the attribute to be changed and set status attribute as dependencies it doesn't work. Obviously as long as I haven't saved the item, the state hasn't changed.

Anyone with hints how I can achieve what I am looking for?

Thanks - franca

One answer



permanent link
Ralph Schoon (57.1k23642) | answered Jan 15, 2:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This has been asked and answered multiple times over the years.
You can not really detect the state change in attribute customization, except you can detect the selected action in conditions.

I know that users have tried to store the state in hidden attributes and used that to detect state changes. I consider that not a great solution. An advisor or follow up action (Java Extension) might be needed here.


Comments
Franca Zober commented Jan 15, 3:13 a.m.

Thanks! 


Java Extension isn't a road for me to follow unfortunately. But for your comment on "detect the selected action" - what field is the selection action stored at/ how to a see that in the script?


Ralph Schoon commented Jan 15, 3:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Read my answer carefully you can detect that only in conditions.

Your answer


Register or to post your answer.