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 / How to compare a strin...
Power Automate
Answered

How to compare a string with "\r\n" if it's true or false?

(0) ShareShare
ReportReport
Posted on by 48

Hello everyone,

 

I have the following output string with "\r\n" and I need to be able to compare this to have a True or False, if I have it has output.

maltiser_0-1710235033602.png

How are you comparing these situations?

 

Thank you

 

Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @maltiser ,

     

    Do you want to check if string contains other characters? For example, "XXX\r\n" returns true?

     

    Two ways for your reference.

    1/Use equals condition to compare "XXX\r\n" and "\r\n".

    vmengmlimsft_2-1710236801971.png

     

    2/Compare length of "XXX\r\n" and length of "\r\n".

    vmengmlimsft_1-1710236631696.png

     

     

     

    Best regards,

    Rimmon

  • Verified answer
    maltiser Profile Picture
    48 on at

    Thank you for your reply, I don't have any characters there.

     

    I was able to compare that with this:

     

    decodeUriComponent('%0D%0A')
     
    Already did here some tests and it's working like a charm! (%0D for \r and %0A for \n)

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard