how can i pass a workflow scratchpad variable to a sub workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2018 11:48 AM
I have defined a scratchpad variable and thought these would carry accross to subworkflows but there are.
Parent workflow > runscript step:
workflow.scratchpad.var1 = 'test';
> subworkflow > runscript step:
gs.log('workflow.scratchpad.var1 ' + workflow.scratchpad.var1);
results in:
workflow.scratchpad.var1undefined
what am i doing wrong, currently very tired and confused
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2018 11:52 AM
Check out these docs. They show you how to do this...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2018 12:30 PM
thanks Mark, I've tried it but think i've missed something.
It says to added a variable to workflow inputs, but i can't even see where this is.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2018 12:39 PM
No problem! Workflow variables are declared in a form available from the Workflow Editor gear menu. Check out this link for details. Feel free to ask again if you get hung up somewhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2018 12:54 PM
i feel like i'm going insane, I can't see a workflow editor gear icon, this is what i have:
This is what i see from the workflow burger icon:
New Workflow
Open Existing
Copy
Publish
Delete
Edit Stages
Edit Catalog Variables
Set Inactive
Expand transitions
Validate Workflow
Show Contexts
Properties
and Workflow Canvas Help