Skip to main content

Notifications

Community site session details

Community site session details

Session Id : lgrorsC90DChXlPfBVYvNg
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,722 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,223 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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

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

Leaderboard > Power Automate - Using Flows

#1
stampcoin Profile Picture

stampcoin 30

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 24 Super User 2025 Season 1

#3
RP-25090907-0 Profile Picture

RP-25090907-0 23

Overall leaderboard

Featured topics

Restore a deleted flow
Loading started