workflow.inputs vs workflow.variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2019 09:02 AM
For workflow input variables I am confused on the correct option. If I drop an activity on my workflow and open it up and then drag my wf inputs from the Data tab into the activity input fields I get the format workflow.inputs.[variablename]
However the ServiceNow documents say to use workflow.variables.[variablename]
Does it depend on use? If I want to access using a Run Script (Javascript) is it better to use one over the other? In my testing I was able to write out to a scratchpad variable using both workflow.inputs and workflow.variables.
Is there a best practice?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2019 10:10 AM
Hi,
workflow.inputs is used I believe when you call subflow and pass values
workflow.variables are external values that are passed into and referenced by a workflow during its execution.
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
