Set catalog item variable manually

joshmorris
Tera Guru

We are transitioning our catalog items from using workflows to flows and in the workflow there was a script that set some of the variables manually via script. I need the same functionality in flow designer. I have the variables as data pills but wondering how I can give them a value?

8 REPLIES 8

@joshmorris 

check my below comments

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

@joshmorris 

I just shared 2 approaches in my 2 different posts.

that should work for you.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Ankur Bawiskar
Tera Patron

@joshmorris 

there is no direct action that updates the variables in flow designer and also it is not recommended also. But you can achieve it through the following steps - 

1) Look up record on the sc_item_option_mtom table where 'Parent Item' is 'RITM' and 'Dependent Item.Question.Name' is 'variable name' (which variable's value you need to change) 

AnkurBawiskar_1-1771411398178.png

 

2) Then look up record -  'sc_item_option' with conditions - 'sys_id' = 'Dependent Item.sys_id' (the first look up record's) 

AnkurBawiskar_2-1771411419521.png

 

3) Then Update the last look up record with desire value change - 

AnkurBawiskar_4-1771411450081.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Ankur Bawiskar
Tera Patron

@joshmorris 

you can create a reusable flow action for this which can be used across any catalog item

check this link and it has approach

Set Value of a Catalog Variable at Flow Designer 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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