Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Comparator not working

(0) ShareShare
ReportReport
Posted on by 4

I have a Excel Table that I'm trying to import into MS Planner and I've gotten it to work but it seems like I got it to work almost by accident.  There is one field that is defined as a number in Excel.  It will either have a 1, 2 , or 3 value.  I want to check to see if the variable is = 1 and then 2 and 3 and if it's none of those, it's supposed to send and email.  Each value 1, 2, or 3 has different things that happen to it.

 

I want to do a compare var = 1 if true do things if false do another compare var = 2 if true do things and if false var = 3 if true do things and if false send email.  The code doesn't recognize the 1, 2, or 3 as integers.  I've gotten it to work by using the comparator "begins with" and that makes it work but for future projects I would like to know how this seemingly straight forward issue isn't working.  I've tried using the INT function on the 1s, 2s, and 3s but I don't think I'm using it correctly.  I've also tried converting the var to an Integer using the INT function but again I'm not sure of the syntax.

 

Any help you can provide will greatly help a budding new user.  Thanks

  • Verified answer
    AnthonyAmador Profile Picture
    2,544 Super User 2025 Season 1 on at
    Re: Comparator not working

    Hi @Prez1210 

     

    When you read rows from an Excel table, you get the rows in string format, if you want to do a comparison, you have two options, compare to a string or convert the string to an integer and compare to an integer. 

     

    For example. 

    AnthonyAmador_0-1636402287225.png

    or 

    AnthonyAmador_1-1636402338896.png

     

    Hope this helps. 

    Kind regards. 

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

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,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,011 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow