asifnoor
Kilo Patron

Hi,

In this article, I will show you how we can access the variables data in the flow designer.

Prerequisites: Install this plugin Flow Designer support for Service Catalog.

Ref: https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/administer/flow-designer/task/re...

Please note that you cannot create a trigger on sc_req_item table in flow designer. So here is how you should do it.

1. On trigger select the table as sc_request.

2. Then create a action and select look up record. Select the table as Requested Item. Under conditions, select the request as the created request record.

3. Then click on select Action and select the available OOB Action "Get Catalog Variables"

In that, Under submitted field, select the RITM record from the above lookup action

Under Template Catalog item, select your catalog item

Once catalog item is selected then you will see a list of variables on the left side. Drag whichever varialbes you wanted to use on the right side bucket.

Here is the screenshot for reference.

find_real_file.png

Once this is done, then you can access these variables in the follow up actions.

So for demo purpose I am just storing those variable values in work notes.

4. Create Update record action and select your RITM record from the above actions.

Under field values select work notes.

On the right side, select the variables from above created action "Get catalog variables" and save.

Here is the screenshot for reference.

 

find_real_file.png

Once this is done save and activate it.

Then your final flow should look like this.

find_real_file.png

Then create a new request and test it.

Let me know if you have any questions in the comments below.

Mark the article as helpful and bookmark if you found it useful.


Regards,
Asif
2020 ServiceNow Community MVP

Comments
Siddhant
Tera Expert

Works absolutely fine!

Thank you.

Razvan
Tera Contributor

how can we access these variables (from the Get Catalog Variables) in a script inside the flow?

Davie
Giga Expert

@Razvan did you get any solution to this?

angel_ayalap
Tera Explorer

You can access the request item variables like this:

 

Sumedh Kharode
Tera Contributor

Hello Razvan,

you can try this in inline script , as this is working for me.

var result = fd_data.trigger.request_item.variables.variable_name;
return result;
 
 
 
Hope this helps !!!
 
 
Regards
Sumedh Kharode
+919834925664
tibrewalayush7
Tera Contributor

Great Explanation.
Thank you!

Rajni Rani1
Tera Explorer

flow designer isn't connected with service catalog.how we can do that in serviceNow?

rlatorre
Kilo Sage

In the Flow Action "Get Catalog Variables", what type of pill can be used for the "Catalog Items and Variable Sets (st_sys_catalog_items_and_variable_sets)"?
I've looked up the actual records in that table and con not seem to use it in that Action.

 

Our requirement / need is to have this Action be dynamic for multiple catalog items that could use the same main Flow.

Thank you for any assistance you could provide.

cielocharomarti
Tera Contributor

Hi, Is there a way to access these RITM variables when the trigger of the flow is a service catalog? Otherwise it is not working for me- The solution needs to be OOB and the variable needed is a RITM, not a REQ. 
THank you!

Santos_10
Tera Explorer

I cannot drop the requested item record from lookup to get catalog variable pill. Am I missing something?

Version history
Last update:
‎11-11-2020 12:34 AM
Updated by: