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 / Compare two text varia...
Power Automate
Answered

Compare two text variables

(0) ShareShare
ReportReport
Posted on by 75

Hi, I'm trying to automate a process with two text variables, the first newvar (variable 1) comes from an excel file, and the second newvar2 (variable 2) comes from webpage data extraction, and then I call the variables from the flow variables datatables. My problem is that I need to compare that the two variables are exactly the same, I use a "IF" block with the parameters:

 

%NewVar%

equal to = 

%NewVar2% 

 

But when I run my RPA, it doesn't run the IF block (the actions inside the If).

 

Do anyone seems to know what is thhe problem or its not possible to compare two variables like that?

 

carcmena99_0-1686324080649.png

carcmena99_1-1686324104443.png

fist variable:

carcmena99_2-1686324127671.png

 

Second Variable:

carcmena99_3-1686324146055.png

 

carcmena99_4-1686324228660.png

carcmena99_5-1686324281531.png

 

 

 

 

I have the same question (0)
  • Verified answer
    Srini007 Profile Picture
    3,463 Super User 2026 Season 1 on at

    Hi @carcmena99 

     

    As you are placing the variables, so we don't know whether the Variable values are having some whitespaces

    That's where you can keep Trim Text action and then you can start comparing, as below

     

    Srini84_0-1686329270973.png

     

    If you find this reply helpful, please consider giving it a LIKE AND

    If this reply answers your question or solves your issue, please ACCEPT AS SOLUTION

     

    Thanks,

    Srini

     

  • carcmena99 Profile Picture
    75 on at

    @Srini007

    Yeah that was the problem the spaces, Thank you!

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard