FortiSOAR Knowledge Base
FortiSOAR: Security Orchestration and Response software provides innovative case management, automation, and orchestration. It pulls together all of an organization's tools, helps unify operations, and reduce alert fatigue, context switching, and the mean time to respond to incidents.
Andy_G
Staff
Staff
Article Id 189963
Description

I have the following use case, I am trying to get a value of a variable in two steps, however later on I need to use this variable.


Imagine the playbook steps are functions, and I need to define a global variable to be used across both funtions.


image



In the case above I need to define a variable that should be set twice, once in step "Get Search Result" and once in "Get Email Details" and then i want to create a condition based on the variable changed in either of the set steps mentioned before.


What is happening is that the final decision step is only considering one variable of the two. How can I create a global variable


You can access the value of the variable in each of the Set Variable steps by using {{ vars.step.stepName.variableName }}. Eg, for "Get Search Result" step by using {{ vars.steps. Get_Search_Result.variableName }}





Contributors