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 / Power automate - Condi...
Power Automate
Answered

Power automate - Condition step calculates incorrectly

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All, 

 

I need some help with my Condition step as it incorrectly classifies the value as False. 

For my flow the condition step is to test whether or not 20 days have been spend working, please check the pictures. When the value in the list is 4 days based on the condition (less or equal than 20 days), this should return as True but it returns as false. 

 

Weirdly enough, sometimes the condition result returns correctly as False, but I can't figure out why it runs correctly in some cases and others it doesn't.  (See picture condition result correct)

 

Based on information on this forum, I tried using the step Int. Variables for string as well as integer and used Concat(20) for the 20 condition. Unfortunately, I wasn't able to solve this but I hope someone can help me. 😊

Power automate flow - condition error flow.png
Power automate flow - condition result correct.png
Power automate flow - condition error result.png
Categories:
I have the same question (0)
  • Verified answer
    shoog Profile Picture
    2,164 on at

    Comparing strings with a less than operator doesn't work well.

     

    If you are sure the input is always a number, initialize the variable as Integer type instead of String or convert it in the comparisson using the int function, so you can do a numerical comparisson. The right side of the condition could be int(20) to be sure it's evaluated as a number.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Shoog, 

     

    Thank you for your quick response but I am getting an error I don't understand. The answer recorded in the SP List is always a number.. What am I doing wrong?

    Schermafbeelding 2023-01-19 113328.png
    Schermafbeelding 2023-01-19 113414.png
  • Verified answer
    shoog Profile Picture
    2,164 on at

    The number is stored in SP as a string, so you have to convert it explicitly while initializing the variable.

    You can use the int function for this, like int(<your input>)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you, it worked! 😁

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 274 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 175

#3
Haque Profile Picture

Haque 166

Last 30 days Overall leaderboard