- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2021 09:11 AM
Hi All,
I have created a subflow in Flow Designer to create an Incident from Alert.
I have written a script to map the assignment group, but i am getting below error
"attempting to use undefined input = 'current' from ...."
Below is the script i have written, I have used to OOB Create Incident Flow Designer and modified to map Assignment group based on our logic.
var src = fd_data.trigger.current.source;
var gr = new GlideRecord('sys_user_group');
gr.addQuery('u_provider', src);
gr.query();
if(gr.next()
{
return gr.sys_id;
}
Any help please.
Thanks,
Madan
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2021 10:07 AM
Hi,
For subflow you cant access the value of trigger. You need to add input variable for subflow and pass value from main flow.
To access subflow input variable you can use below code:
var src = fd_data.subflow_inputs.source;
// Replace source in above code with the name of input variable
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2021 09:49 AM
Hi Madan,
It will be helpful if you can share a screenshot of the larger flow, including this specific action as well as the data pane.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2021 10:07 AM
Hi,
For subflow you cant access the value of trigger. You need to add input variable for subflow and pass value from main flow.
To access subflow input variable you can use below code:
var src = fd_data.subflow_inputs.source;
// Replace source in above code with the name of input variable
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2021 05:13 AM
Hi Palani,
Thanks for your help.
It worked with one modification. We need to do dot walking with input variable to get the field value.
var src = fd_data.subflow_inputs.alertgr.source;
Thanks Again...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2021 05:31 AM
Please close the thread if your issue is resolved
Palani