If Variable Defined Action



The If Variable Defined action enables you to control the flow of your build depending on whether a FinalBuilder variable is defined. If the variable is defined, then the child actions of the action will be executed.


A variable is defined if it appears in the Edit Variables dialog at all. To test if a defined variable has a value or not, use the If .. Then action.


An Else Action can be used to provide a list of actions to execute if the variable is not defined. Alternatively, you can set the action to fail if the variable is not defined.



Note: The action also tests for Windows Environment variables.





Variable Name


Specify the name of a FinalBuilder variable (or, as in the above picture, a Windows Environment variable) to test for.





Choose 'Execute child actions' if you want the If Variable Defined Action to behave like an If .. Then Action.


Choose 'Action fails if variable is not defined' if you want the action to fail if the variable is not defined. (Note that if the variable is defined, child actions are still executed.)