Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Power automate - Condition step calculates incorrectly

(0) ShareShare
ReportReport
Posted on by

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. 😊

  • Community Power Platform Member Profile Picture
    on at
    Re: Power automate - Condition step calculates incorrectly

    Thank you, it worked! 😁

  • Verified answer
    shoog Profile Picture
    2,164 on at
    Re: Power automate - Condition step calculates incorrectly

    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
    on at
    Re: Power automate - Condition step calculates incorrectly

    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?

  • Verified answer
    shoog Profile Picture
    2,164 on at
    Re: Power automate - Condition step calculates incorrectly

    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.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,700 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow