The CreatorCon Call for Content is officially open! Get started here.

Pass variable parameter from catalog item to flow

Nico12
Mega Sage

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,

1 ACCEPTED SOLUTION

Nico12
Mega Sage

Update to say that i succeed.

 

I create an input variable like this :

find_real_file.png

 

and called it in the script :

find_real_file.png

 

Thanks for the helps!

Regards

View solution in original post

8 REPLIES 8

Hi Ankur,

I have created a custom action script with imputs like this :

find_real_file.png

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 :

find_real_file.png

 

Unfortunatly, the script return an empty variable.

Do you have a clue ?

 

Regards

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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

find_real_file.png

it return the name of the variable (at the end of the log).

Nico12
Mega Sage

Update to say that i succeed.

 

I create an input variable like this :

find_real_file.png

 

and called it in the script :

find_real_file.png

 

Thanks for the helps!

Regards