Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Ignoring case sensitivity in conditions

(0) ShareShare
ReportReport
Posted on by

I am trying to send myself an e-mail when I receive an e-mail with certain keywords (I am actually sending the e-mail to my cell using my carrier web address. I have a condition that reads "if body contains the words URS, Scheduling, or Field Service", send an e-mail. More precisely, my condition is:

@or(contains(triggerBody()['Body'], 'URS'), contains(triggerBody()['Body'], 'Scheduling'), contains(triggerBody()['Body'], 'Scheduling'), contains(triggerBody()['Body'], 'Field Service')) 

 

When testing, I noticed that the e-mails with the term "Scheduling" (with a capital "S") triggered the rule, while the word "scheduling" with lower case "s" did not. If there an easy way to establish that case sensitivity doesn't matter?

  • Gus Profile Picture
    136 on at
    Re: Ignoring case sensitivity in conditions

    Very helpful @v-bacao-msft . Wondering if there is a way to do this "toLower" with Dynamics 365 Lead and Contact email fields directly to avoid having to update flows to fix at the source of our data.

  • GokuPe Profile Picture
    4 on at
    Cheap trick worked!!

    The logic solution is to move the text (attachment name in my situation) to lower (or upper) and make the comparison text lower (or upper), in the condition you can use toLower function BUT it didn't allow me to select the attachment name

     

    so you hover the field it does not allow you to select 

    GokuPe_1-1663525550559.png

     

    and type in in the function 

    toLower(items('Apply_to_each')?['name'])

    GokuPe_0-1663525444724.png

    AND WORKED!!!

     

    zaz

  • GabrielStJohn Profile Picture
    on at
    Re: Ignoring case sensitivity in conditions

    Hello, @dgittler!

    Thank you for posting on the Flow Community Forum! Have you had an opportunity to apply @v-bacao-msft‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

    Thank you for being an active member of the Flow Community!

    -Gabriel
    Flow Community Manager

  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Ignoring case sensitivity in conditions

    Hi @dgittler,

     

    Using contains in the Condition to determine whether the specified string is included is indeed case sensitive.

    Maybe you could consider using toLower() function to convert the contents of the body to lowercase, and then set the specified string to lowercase, so that you could avoid case sensitivity.

    Formula reference:

    @or(contains(toLower(triggerBody()?['Body']), 'scheduling'),contains(toLower(triggerBody()?['Body']), 'urs'),contains(toLower(triggerBody()?['Body']), 'field service'))

    I have made a test on my side, it work, as below:

    53.PNG

    54.PNG

    Take a try.

      

    Best Regards,

    Barry

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow