How to Initialize Boolean Variable in Power Automate

This Power Automate tutorial will help you to understand what is Power Automate Boolean Variable and How to Initialize Boolean Variable in Power Automate with different examples.

Also, Read: What is Initialize Variable in 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.

Power Automate initialize Boolean Variable

Let us see how we can 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
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.
  • In the Value field, add the dynamic content value for the newly added column from the SharePoint list.
Power Automate initialize variable boolean example
Power Automate initialize Boolean Variable example
  • Now we will implement the action flow logic by selecting plus sign (+New Step). From the list of actions, search and select the Condition action, 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
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 then it returns true else false.
  • So here I have modified the highlighted list item, which consists of the Yes value.
Example of Power Automate initialize variable boolean type
Example of Power Automate initialize the 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
Power Automate initialize variable boolean type example

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

Check out: How to Initialize Float Variable in Power Automate

Power Automate initialize Boolean Variable false

Here we will see how we can initialize 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
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, else 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
Power Automate initialize variable boolean false
  • Test and Run the Power Automate flow, if the created item or a modified item consists of a yes value then it returns true else false.
  • So here I have modified the highlighted list item, which consists of the No value.
initialize variable boolean false Power Automate
initialize variable boolean false Power Automate
  • In the below screenshot, you can see 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
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, we have learned what is the Boolean Variable type and how to initialize the Boolean variable type in Power Automate with different examples.