Skip to main content

Notifications

Community site session details

Community site session details

Session Id : yGgybSPR8KDAm99sTA4xyN
Power Automate - Using Flows
Answered

How to compare 2 strings using condition

Like (0) ShareShare
ReportReport
Posted on 8 Jan 2024 14:31:14 by 33

Hi guys

I´m trying to compare two strings using a condition but the result is always wrong... can anyone help me?

For example: 

the value of compose 3 is 322,30 € (locale de-de), the value of compose 4 is 1000,00€ (locale de-de)

 

The check in the condition is: if compose 3 is equal or greater than compose 4 

 

Why would the result be true? 

 

Regards,

Lisa

  • lisa_garcia Profile Picture
    33 on 25 Jan 2024 at 15:15:08
    Re: How to compare 2 strings using condition

    Thanks so much! @Chriddle 

  • Verified answer
    Chriddle Profile Picture
    7,685 Super User 2025 Season 1 on 10 Jan 2024 at 07:30:50
    Re: How to compare 2 strings using condition

    Since string comparison works different from Number comarison, you first have to convert these string to numbers.

    1. Remove the dot
    2. Replace the comma with a dot
    3. Remove the €
    4. Remove the whitespace
    5. Use float to convert
    float(
    	trim(
    		replace(
    			replace(
    				replace(
    					'1.000,00 €',
    					'.',
    					''
    				),
    				',',
    				'.'
    			),
    			'€',
    			''
    		)
    	)
    )

     

     

  • lisa_garcia Profile Picture
    33 on 08 Jan 2024 at 15:13:56
    Re: How to compare 2 strings using condition

    @ScottShearer sure

    compose 4:

    lisa_garcia_1-1704726644868.png

     

    compose3:

    lisa_garcia_0-1704726631263.png

     

    sorry, it´s in german 🙂 

  • ScottShearer Profile Picture
    25,218 Most Valuable Professional on 08 Jan 2024 at 14:47:14
    Re: How to compare 2 strings using condition

    @lisa_garcia 

    Can you post screenshots of the outputs of Compose3 and Compose4  after a run please?

     

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!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,765 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow