How to Change Variable Value in ServiceNow Flow Designer?

MaramA
Tera Contributor

Hi everyone,

I'm currently working with Flow Designer in ServiceNow and need some assistance with changing the value of a variable during the flow execution.

Here's what I'm trying to achieve:

  • I have created a field with three options: None, Yes, and No.
  • I want to dynamically change this field's value from None to either Yes or No within the flow.
  • Based on this change, I want to trigger additional actions, such as making another field appear in the variables of a catalog task.

For example, when the value is changed to Yes, I want another field to appear in the catalog task variables.

Has anyone done something similar or can guide me through the process? Any tips?

6 REPLIES 6

Mark Manders
Mega Patron

Is this a flow variable or a variable on the catalog task. And you are also saying you created a field. Is that field a variable on the catalog item or a field on the record? 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

MaramA
Tera Contributor

Hi @Mark Manders 
The variable is part of the catalog item but is not visible to the client. It will only appear in the back office as a catalog task variable.

And you are setting that variable through a flow after the task is created? Based on what conditions? Isn't it weird to change a task after it has been requested? 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

I want to change the value of that variable before creating the task. What conditions should trigger this change? That's what I'm trying to determine.