- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 03:00 PM
How to pass values from a from to a workflow that is inside another workflow.
Thanks for your answer.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 03:17 PM
! !Hello Som,
Here is the documentation on how to do that.
1. Define inputs on the subflow - Define inputs for a subflow
2. Pass inputs from main workflow to subflow - Invoke a subflow in a workflow
Here is an example -
This example simply passes the value of short description field on incident form to a subflow. The subflow then copies the value of short description over to description field.
Step 1 - Create an input variable in subflow of type string and label it as short des
Step 2 - Add a run script to read the input variable in subflow
Step 3 - Drag and drop the subflow in main flow. You will get a dialog where you need to set the value of input variable you created in subflow in step 1.
Let me know if you need any additional info on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 03:17 PM
! !Hello Som,
Here is the documentation on how to do that.
1. Define inputs on the subflow - Define inputs for a subflow
2. Pass inputs from main workflow to subflow - Invoke a subflow in a workflow
Here is an example -
This example simply passes the value of short description field on incident form to a subflow. The subflow then copies the value of short description over to description field.
Step 1 - Create an input variable in subflow of type string and label it as short des
Step 2 - Add a run script to read the input variable in subflow
Step 3 - Drag and drop the subflow in main flow. You will get a dialog where you need to set the value of input variable you created in subflow in step 1.
Let me know if you need any additional info on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 05:41 AM
Thanks so much Ashwinkumar!
I actually have a out of the box workflow, which has a sub-workflow. I want to assign the values to sub-workflow from the form.
What is the best way to do it. Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 06:03 AM
I was just able to work it out. (actually the form was missing value, dhu)
in the sub-workflow that is what worked well for me (in advance script section).
task.columnName = current.columnName;
Ex.
task.assignment_group = current.assignment_group;
Reference:
http://wiki.servicenow.com/index.php?title=Using_Variables_in_a_Workflow#gsc.tab=0
Thanks Ashwinekumar for your answer. It is the correct answer to the initial question I asked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 09:23 AM
If I've answered your question, please mark the response as correct (not just helpful) so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. Please review How to Mark Answers Correct From Inbox View.