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

1–2 minutes

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

 


Discover more from Nate Chamberlain

Subscribe to get the latest posts sent to your email.

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

  1. Eyal P Avatar
    Eyal P

    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. SharePoint Librarian Avatar

    Try checking for “true” or “false” instead of 1 or 2. Good luck!

  3. Carlos E Avatar
    Carlos E

    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

  4. Clayton Fleming Avatar

    Thank you for an excellent post, it was very interesting and informative.

  5. […] advanced mode to remove the single quotes from around the word true for it to work correctly. See this post for […]

  6. Jim Kline Avatar
    Jim Kline

    Yep found that one out the hard way! O365 does tend to test ones ability err sanity:)

Leave a Reply

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

Discover more from Nate Chamberlain

Subscribe now to keep reading and get access to the full archive.

Continue reading