- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2019 01:52 AM
How in the world do I set scratchpad value's on 'true/false' values.
The Reset AD Password Activity in the PWD Reset - AD has scratchpad value's attached to a boolean
How??
Solved! Go to Solution.
- Labels:
-
Orchestration
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 11:30 AM
Hi,
We don't normally provide the capability to link a workflow scratchpad variable to a true/false (boolean) input field. But there IS a workaround in order to achieve what you are seeing:
- Assumption is that you have some Workflow activity input that is currently of type Boolean.
- Switch the activity's input to a String temporarily, then save the activity. This will allow you to set its value, for example, to ${workflow.scratchpad.SOME_VARIABLE} in the Workflow Editor.
- Go back to the activity and reset the input to type Boolean. Save the activity.
- Go back to Workflow Editor and notice that the input field is now linked to ${workflow.scratchpad.SOME_VARIABLE} as shown in the your screenshot.
To anyone who sees this later, please be aware that this IS considered a customization, and so can potentially cause confusion later on if you need help from technical support to debug any issues involving the activity.
An alternative that does NOT involve any customizations is to drag Data Elements from the "Data" tab (on the right navigation bar of the Workflow Editor) into the checkbox. The Data tab contains Workflow Inputs and Activity Outputs, though it does NOT contain scratchpad variables (hence your question). For example, instead of doing the customization above, you could do the following:
- Create a workflow input of type Boolean, OR create an activity right before the target activity with an output of type Boolean
- In the target activity, drag the variable name from the Data tab into the checkbox. This will automatically create a link to the variable.
I have attached a screenshot showing you what you should do for the non-customization case below.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2019 07:28 AM
Hi,
Sorry, not sure I fully understand...you can set is to a true/false by doing:
workflow.scratchpad.name = true; or false;
Not sure I understand what else you may be asking, sorry!
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2019 12:46 AM
The question is how do I link a scratchpad value to the activity boolean, not fill.
So not setting the value, but set the variable scratchpad on the 'boolean'
The strings are pretty obvious, but ServiceNow did this within their PWD Reset - AD on the activity boolean, how do I do this?
So for instance I will create workflow.scratchpad.pwdResetNeeded, and I need to set that value onto the 'boolean'.
PWD Reset - AD:
Our own Flow:
They manage to link it to a variable, and I have no clue how or where to do this.
Basically my question how do I create the link icon shown on their activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2019 11:30 AM
Hi,
We don't normally provide the capability to link a workflow scratchpad variable to a true/false (boolean) input field. But there IS a workaround in order to achieve what you are seeing:
- Assumption is that you have some Workflow activity input that is currently of type Boolean.
- Switch the activity's input to a String temporarily, then save the activity. This will allow you to set its value, for example, to ${workflow.scratchpad.SOME_VARIABLE} in the Workflow Editor.
- Go back to the activity and reset the input to type Boolean. Save the activity.
- Go back to Workflow Editor and notice that the input field is now linked to ${workflow.scratchpad.SOME_VARIABLE} as shown in the your screenshot.
To anyone who sees this later, please be aware that this IS considered a customization, and so can potentially cause confusion later on if you need help from technical support to debug any issues involving the activity.
An alternative that does NOT involve any customizations is to drag Data Elements from the "Data" tab (on the right navigation bar of the Workflow Editor) into the checkbox. The Data tab contains Workflow Inputs and Activity Outputs, though it does NOT contain scratchpad variables (hence your question). For example, instead of doing the customization above, you could do the following:
- Create a workflow input of type Boolean, OR create an activity right before the target activity with an output of type Boolean
- In the target activity, drag the variable name from the Data tab into the checkbox. This will automatically create a link to the variable.
I have attached a screenshot showing you what you should do for the non-customization case below.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2019 12:48 AM
Your a hero 🙂
thanks worked like a charm!
---
I'm not sure and I know the flow designer is following up, but documentation for this would be nice. But it's here now so atleast somebody can find it!