Get Action time stamp in calculated value?
![]()
Hi
I want to get the timestamp when an action occurs in RTC. I have done some scripts with the calculated value, but not one that gets updated everytime they pass from example from State1 to State 2. Can I get that? Thanks |
One answer
![]()
Ralph Schoon (62.3k●3●36●43)
| answered Aug 15 '14, 3:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Cesar,
dealing with state changes in JavaScript is problematic. It would be interesting what do you want to achieve here. Which version of RTC do you use? There are numerous issues here. https://jazz.net/wiki/bin/view/Main/AttributeCustomization shows that you can only detect the state you are in. The action is only available in conditions and, since it has not happened yet, not very useful either. You can not detect a state change is about to happen, or has happened. The only way I think you could try to do what you want is to store the current state in a hidden attribute. You can not act on the save. You would have to detect that a state change has happened and then copy the modification date into the attribute. Dependent on what you want to achieve, you might be better off, using a server follow up action extension. Comments Hi Ralph
![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can only save the state (from the attribute state) you have access to. If you do that, I think you should be able to detect that the current state is not equal to the state value in the attribute. Only in this case you know a change has been done and can act upon it. If the current state equals the attribute value you would not know what is going on and also not provide the attribute value, or rather pass the old value of the attribute.
Hy Ralph, Hy Cesar,
|