use current.varable_name and previous.variable_name functionality in a workflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2017 02:03 PM
I am scripting within a workflow and am trying to trigger an action based on if a boolean field value has changed. Since workflow activities do not have the built in "change" condition like a business rule, I am attempting to do this with a condition. In an "IF" workflow activity, I have " if (current.variable_name == true && previous.variable_name == false) {run script} ". The function is not able to enter this statement, because it does not recognize the use of current.variable_name or previous.variable_name. Can I use these key words in a workflow script?
Any insight appreciated!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 01:04 PM
Unfortunately I have found that variables do not behave the same way as fields when it comes to changes (previous vs current). Where is this variable set? Is it set somewhere in a task? What is the business reason for doing something when the variable changes?
The only thing I can think of is setting a workflow scratchpad before the variable is expected to be changed, then check the current.variable_name against the workflow.scratchpad value after the time when the variable is expected to be changed.