Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Update a single variable after the RITM submitted before creating catalog task

deepthip2
Tera Contributor

Hi All,
I would like to implement a logic in Flow Designer where, upon submitting a request, a specific variable is dynamically updated based on the location of the user (i.e., the value of u_requested_for.location). This updated value should then be captured in a variable and reflected in the associated Catalog Task.

need to implement the below code in flow designer. Please refer the below attachments and help me how to implement that step.

if (current.variables.u_requested_for.xxxxxxx== "abcdefg") //Kingsport
{
current.variables.xxyyzz= 'test'
} else {
 current.variables.xxyyzz= current.variables.u_requested_for.location.u_primary_stockroom;
}
3 REPLIES 3

Kieran Anson
Kilo Patron

There isn't a flow action OOTB to allow you to set the value of a flow variable. You'll need to create a custom action for this

 

Set Value of a Catalog Variable at Flow Designer - ServiceNow Community

Ankur Bawiskar
Tera Patron
Tera Patron

@deepthip2 

there is not OOTB Flow action to update RITM variable

2 approaches

1) use custom flow action for this, see below link response from Dirk

How to update variables in RITM using Flow Designer? 

OR

2) update the variable directly using Lookup and Update

sc_item_option_mtom table stores all the variable associated with RITM, you can use lookup action in flow designer and can update the variables value in "sc_item_option"

Something like this

AnkurBawiskar_0-1762185610899.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

@deepthip2 

Hope you are doing good.

Did my reply answer your question?

💡 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