Passing data from a parent workflow to a subflow

dwilborn
Tera Contributor

I've recently created some logic on a form which kicks off a work flow.  This form is not exposed to the Service Portal and is only available to itil users.

When building the workflow I included a subflow which creates tasks that are assigned to various groups.  During this process I came across the note "You cannot pass variables to a subflow that runs on the Requested Item [sc_req_item] table." on https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/workflow-activities/t...

This is quite unfortunate as I do not wish to create a catalog item for fulfillers to fill out - I just want the platform to recognize box "A" was checked, perform actions A, B, C, D, etc.

What I am mostly curious about is:

WHY can't we pass variables to the sc_req_item table?

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

For workflows on sc_req_item table, on the properties of the workflow the "Inputs" section is hidden (by UI Policy). Why? I haven't found a valid answer for this 🙂
On our company environment, I've disabled this UI Policy and we are using the Inputs. With the inputs, we've setup parent en child workflows for sc_req_item tables.

You can already find the related UI Policy by:

find_real_file.png

You will quickly notice: "Hide/Show inputs/catalog variable workflow property tabs".

Recently I did came across a System Property which might actually do the same. Haven't tested yet because we simply disabled the UI Policy. Though looking at the description of the System Property this might also work. Again, untested!

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hi,

Please see this post: https://community.servicenow.com/community?id=community_question&sys_id=1aed83addb9cdbc01dcaf3231f96... and pay particular attention to Fabian's response.

I haven't personally tested this, but it appears that the workflow scratchpad variables are able to see be accessed within your subflow (given that a parent and sub workflow are on the sc_req_item).

If you can give more details, maybe we can assist further? Otherwise, the post above tells you how you can access them.

Give it a try?

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Mark Roethof
Tera Patron
Tera Patron

Hi there,

For workflows on sc_req_item table, on the properties of the workflow the "Inputs" section is hidden (by UI Policy). Why? I haven't found a valid answer for this 🙂
On our company environment, I've disabled this UI Policy and we are using the Inputs. With the inputs, we've setup parent en child workflows for sc_req_item tables.

You can already find the related UI Policy by:

find_real_file.png

You will quickly notice: "Hide/Show inputs/catalog variable workflow property tabs".

Recently I did came across a System Property which might actually do the same. Haven't tested yet because we simply disabled the UI Policy. Though looking at the description of the System Property this might also work. Again, untested!

find_real_file.png

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

dwilborn
Tera Contributor

Thank you both for your replies.  I appreciate the insight into the work-arounds.

 

Regards,

 

Daniel

Hi,

No problem. If my reply above was Helpful, please also mark it as such.

Take care!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!