web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Why does this return F...
Power Automate
Answered

Why does this return False

(2) ShareShare
ReportReport
Posted on by 12
Hey All,
 
Surely a very silly question, but in my flow that runs hourly, at certain times of day i use an IF statement to check the time, and if condition is met, the flow has to perform some additional steps.
 
In the example from the run below at 2300 UTC, start of hour condition equals to TRUE, but the OR statement returns FALSE - does anyone know why this is? My understanding of OR, if any of the conditions returns true, the whole expression should return true. 
 
Any thoughts what I could be missing here.
 
Categories:
I have the same question (0)
  • Suggested answer
    Haque Profile Picture
    3,249 on at
    Hi @PiminMaito,
     
    I suspect your compasions giving trouble, your understanding is correct of Or operation. Here are some points we need to consider on your logical checks:
     
    Global Statement: In Boolean Algebra logic, OR should return true if any condition is true. I see, in your run, one of the comparisons (startOfHour(...) = 23) clearly evaluates to true. Yet the overall OR block shows false.
     
    Extract the hour explicitly - to make it INTEGER
    int(formatDateTime(startOfHour(utcNow()), 'HH'))
    
    Now let's compare:
    1. Condition 1: int(...) = 8
    2. Condition 2: int(...) = 15
    3. Condition 3: int(...) = 23
     
    OR block will now evaluate correctly, because all comparisons are of the same type.
     
     
    Note: How your logic is treated:

    startOfHour(...) returns a datetime value (e.g., 2026-03-20T23:00:00Z), not just the number 23When you compare that to "23", "08", "15", the designer UI shows the individual comparison as “True” (because it coerces the values for display).

     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • Verified answer
    Chriddle Profile Picture
    8,697 Super User 2026 Season 1 on at
    The correct condition result is False, because you compare Strings with Integers.
    The result of the expression is a String but if you write a number into Dynamic content, it's a number.
     
    Check this:
    startOfHour(outputs('Compose'), 'HH')
    equals(startOfHour(outputs('Compose'), 'HH'), 23)
    equals(startOfHour(outputs('Compose'), 'HH'), '23')
     
    Result:
     
    The new Designer is clearly making a mistake here.
    I assume that the value "False" comes from the server-side evaluation, while the value "True" from the last condition is only calculated (falsely) in the designer.
     
     
    To solve your issue, enter an expression: 
    string(23)
    instead of just 23
  • PiminMaito Profile Picture
    12 on at
    thank you both for giving me the pointers and Chriddle for acknowledging the issue with the new designer - that threw me off.
     
    I will try again!
     
    here a small edit by the way, 08 worked fine. 

  • Chriddle Profile Picture
    8,697 Super User 2026 Season 1 on at
    Yes, the dynamic value 08 is interpreted as a string because of the starting 0.
    You can verify this at any time in the code view (by checking for quotation marks).
     
     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard