- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2021 10:21 PM
Hi,
I have created flow designer for one catalog item and using subflow in that .
I am passing trigger requested item as input in subflow.
How to use those input variables in catalog task description script. I want to use RITM's sys_id in subflow script.
can someone please help.
Regards,
Sonali j
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021 01:30 AM
So can you share a bit of what you are scripting? Anyway, without knowing that, you do have a subflow input "ritm", you can access that in script using:
var ritm_sysid = fd_data.subflow_inputs.ritm
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021 12:19 AM
What's the reason for wanting to use the script field? As you can drag and drop or use the data pill.
Scripting is certainly possible, though why?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021 12:47 AM
In description part of catalog task we need variables values to be populated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021 01:30 AM
So can you share a bit of what you are scripting? Anyway, without knowing that, you do have a subflow input "ritm", you can access that in script using:
var ritm_sysid = fd_data.subflow_inputs.ritm
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 03:58 AM
the subflow_inputs variable doesn't comeup in auto-suggestion. Is that true?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2021 12:56 AM
since you want to set catalog task description with variable value; you can use the inline script in f(x) for task description field
No need to create subflow for this
As mentioned by Mark you can drag and drop; but here is an Script example in f(x) for Description field
You can enhance it as per your requirement.
var sysId = fd_data.trigger.current.sys_id;
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', sysId);
gr.query();
if(gr.next()){
return "My Variable Value " + gr.variables.variableName; // give the variable name here
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader