- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-07-2025 10:48 AM
I'm working with Flow Designer and have a subflow that creates a Catalog Task. On the catalog form, there is a server field, which is a lookup select box pulling from cmdb_ci_server . I need to populate the Configuration Item(cmdb_ci) field in the Catalog Task with the value the user selected in the server field while submitting the request. However, when I try using the script below, I receive the error "cannot read property 'variables'".
Could someone guide me on how to correctly pass the value from the server field to the Configuration Item field in the Catalog Task?
var field1 = fd_data.trigger.current.variables.variable_name;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-07-2025 04:05 PM
Hi @NiharikaC,
Instead of using a script, use the flow action 'Get Catalog Variables'.
You can then use the catalog variable data pill in your catalog task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-07-2025 08:12 PM
Hi @NiharikaC
Please follow the below approach to achieve your requirement :
1. Create a Subflow which will be responsible to create the catalog task. Inside the Subflow, you need the input RITM and the server field value which will be passed from the catalog item.
Save and publish the Subflow.
2. Create a flow with Trigger Type as Service Catalog. Inside the flow, make use Get Catalog Variables action to get the server field value submitted by the requestor followed by calling your Subflow.
Output -
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-07-2025 04:05 PM
Hi @NiharikaC,
Instead of using a script, use the flow action 'Get Catalog Variables'.
You can then use the catalog variable data pill in your catalog task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-07-2025 06:34 PM - edited ā01-07-2025 06:35 PM
Hello @NiharikaC
Try this
return fd_data.trigger.request_item.variables.variable_name.getDisplayValue()
If this helped please hit like and mark it as an accepted solution. It helps future readers to locate the solution easily in community.
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-07-2025 08:12 PM
Hi @NiharikaC
Please follow the below approach to achieve your requirement :
1. Create a Subflow which will be responsible to create the catalog task. Inside the Subflow, you need the input RITM and the server field value which will be passed from the catalog item.
Save and publish the Subflow.
2. Create a flow with Trigger Type as Service Catalog. Inside the flow, make use Get Catalog Variables action to get the server field value submitted by the requestor followed by calling your Subflow.
Output -
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.