Can you have a "scratchpad" similar variable in the Flow Designer for a subflow like you can for a workflow?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2020 10:04 AM
I need a way to have a "scratchpad" type of variable in the Flow Designer for a subflow. I have been unable to find a way to create a variable that can be set to a value and used further down in the subflow, similar to what you would do in a workflow (only this would be used in the Flow Designer with a subflow.)
I am trying to set a variable that I can use further in the subflow to reference a sys_id. I will then use the variable with the sys_id to do a lookup to find the record that needs to be updated. Is this possible with Flow Designer?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2020 01:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2020 06:04 AM
They don't have it right now. (Refer KB0817612)
There seems be only one way of doing this.
1. Create a Custom table
2. Create a Flow Action with a Script step that Insert/update/delete/get records in this custom table
3. Wait for Servcienow to release the new feature 😄
P.S: Custom tables are now Licensed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2020 12:46 PM
Hi Sara,
I discovered your post as I too was looking for a way to use scratchpad in ServiceNow flows.
Since scratchpad still isn't available, I settled on a workaround which uses custom system property to store my "scratchpad" value. I then refer to the system property value for the remaining steps in my flow.
I typically use this technique for scheduled flows where I don't have multiple instances of your flow running at the same time i.e. scheduled batch jobs.
- Lookup your custom property
- In the next step populate your property's value with your temp "scratchpad" value
- Refer to the property value in subsequent steps using the data pill
- Or refer to the property value in code
- Clear the property for use in the next flow
I find this to be a useful workaround for the lack of scratchpad functionality in Flows at present. It also doesn't require custom tables which will have a licence implication.
If you found this information useful, then please mark as helpful or correct.
Thanks,
Brent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2020 10:07 PM
This is a very bad solution - setting a system property typically causes a 'cache refresh' on all your nodes. If your flow runs rarely, you will probably not notice. However, if your flow runs very frequently, this may cause severe performance issues.
In general, only use properties for true 'settings' - not for dynamic data.
A better solution would be a custom 'script action' as defined above, that has a certain output, you can then use the data-pill output variables of that action.
See also:
https://community.servicenow.com/community?id=community_blog&sys_id=53dd6ae9dbd0dbc01dcaf3231f961999

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2021 09:23 AM
Hi Sara - ServiceNow released the scratchpad equivalent for Flow Designer with Quebec, now called Flow Variables. Enjoy!