How to Initialize Boolean Variable in Power Automate?

In this Power Automate tutorial, I have explained how to initialize a boolean variable using Power Automate.

Power Automate Boolean Variable

The boolean variable type in Power Automate has two possible results: true or false. It produces a boolean value that is either true or false depending on the condition that was applied.

How to initialize boolean variable using Power Automate

Let us see how to initialize a Boolean Variable in Power Automate with an example.

  • In this example, I have created a Yes/No column in the SharePoint list (Task List)as below.
  • And if the initialized variable is equal to the true value, it returns the true else it returns the false value.
Power Automate initialize variable boolean
  • When the Power Automate flow has been created, select an action to initialize the variable in a Boolean format as displayed below:
  • Fill in the variable name (VarBool) and choose the type of the variable as Boolean.
  • Add the dynamic content value for the newly added column from the SharePoint list in the Value field.
Power Automate initialize variable boolean example
  • Now we will implement the action flow logic by selecting the plus sign (+New Step). Search and select the Condition action from the list of actions and apply the condition.
  • If the initialized variable is equal to True then it executes to the “If Yes” action, else it executes to the “IF No” action.
VarBool is equal to True

Where,

  1. VarBool is an initialized variable name
  2. is equal to an operator name
  3. True is a function name.
Example of Power Automate initialize variable boolean
  • Test and Run the Power Automate flow, If the created item or a modified item consists of a yes value, it returns true or false.
  • So here, I have modified the highlighted list item, which consists of the Yes value.
Example of Power Automate initialize variable boolean type
  • Once the Power Automate flow has run, we can see that it returns the true expression because the modified item consists of a yes value in the Screenshot below:
Power Automate initialize variable boolean type example

This is how to initialize a Boolean Variable in Power Automate flow.

Power Automate initialize Boolean Variable false

Here, we will see how to initialize a Boolean Variable false in Power Automate.

In this example, we will choose the variable type as boolean and modify the SharePoint list item consisting of No value. And if the initialized variable is equal to the true value, it returns the true; else, it returns the false value.

  • Select Power Automate flow has been created to select an action to initialize the variable in a Boolean format, as displayed below:
  • Enter the variable name and choose the variable type as boolean, and in the values field, add the dynamic content value for the newly added (Yes/No) column.
Power Automate initialize variable boolean example

Select the (+New Step) to add the condition action, If the initialized variable is equal to False, then it executes the “If NO” action, it executes the “IFYes” action.

VarBool is equal to false

Where,

  1. VarBool is an initialized variable name
  2. is equal to an operator name
  3. False is a function name.
Power Automate initialize variable boolean false
  • Test and Run the Power Automate flow; if the created or modified item consists of a yes value, it returns true or false.
  • So, I have modified the highlighted list item, which consists of the No value.
initialize variable boolean false Power Automate
  • The screenshot below shows that it returns the boolean type as a true value and the expression as a false value based on the condition value because the modified item consists of a No value.
Example of Power Automate initialize variable boolean false

This is how to initialize Boolean Variable false in Power Automate.

Additionally, you may like some more Power Automate and SharePoint tutorials:

In this Power Automate tutorial, I have explained, what is a boolean variable in Power Automate and also how to initialize a Boolean variable type in Power Automate.