Solution: Using a Yes/No checkbox in a Microsoft Flow condition statement

2017-09-17_13-59-37

It’s not uncommon to want to use yes/no checkboxes when building Microsoft Flow conditions. [Field] is equal to “Yes” or [Field] is equal to true won’t work because it reads the Yes or true as a string rather than a value. So when the flow runs, even if the checkbox is checked (true), the run history says the expression result was false.

Fortunately it’s a simple two-step fix. Follow these steps to be able to use yes/no checkboxes as conditions in your flows:

  1. Type a lowercase “true” or “false” in the last field of the condition statement and click “Edit in advanced mode
    yesno2.PNG
  2. Remove the single quotation marks (‘) around the word true or false. You can click edit in basic mode again to see the difference if you wish.
    yesno3.PNG

That’s it! Your flow should now run properly when the box is checked or unchecked based on your condition.
yesno1

 

6 Replies to “Solution: Using a Yes/No checkbox in a Microsoft Flow condition statement”

  1. Hi,
    i dont have the ‘edit in advance mode’ link, i think it was removed by MS.
    how can i write it in a basic mode?

    thanks

  2. Thanks for this Nate,

    Your blog is very useful for newbies like me, very appreciated.

    Just wondering, can I use the default checkbox included in the tasks list? (it’s name is: Completed) apparently it returns a numberic value (1 or 0)

    Something like: @equals(triggerBody()?[‘Checkmark’], 1)

    I used it into a condition -comparing it to 1 or 0 but, it does not work. Workflow always chose the false condition.

    Any ideas on this?

    Thank you!

    Carlos

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.