- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 12:14 AM
Hi,
I have a catalog item with one single variable.
User can chose application from cmdb_ci_appl.
After submitting, the task should automatically run a script that will get the application the user enter.
I was thinking using a flow but i don't know how to pass the variable name from the Task to the script in the flow
I have a line like this :
var application_name = ["NAME OF THE APPLICATION"];
The application name chosen by the user in the catalog item should goes here in the flow script.
Any idea how to achieve this ?
Regards,
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 04:38 AM
Update to say that i succeed.
I create an input variable like this :
and called it in the script :
Thanks for the helps!
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 02:56 AM
Hi Ankur,
I have created a custom action script with imputs like this :
Then i call this input in my script :
var application_name = ["application_from_script"];
Final step in my flow i link application_from_script with my catalog variable :
Unfortunatly, the script return an empty variable.
Do you have a clue ?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 03:15 AM
Hi,
it takes a reference object as input
So can you just use this as input 1->application and don't send Name
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 03:39 AM
Hi,
I need to return the name so i change the type variable for string.
Is it the right approach ?
I still does not work
it return the name of the variable (at the end of the log).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2022 04:38 AM
Update to say that i succeed.
I create an input variable like this :
and called it in the script :
Thanks for the helps!
Regards