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?
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.
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
and type in in the function
toLower(items('Apply_to_each')?['name'])
AND WORKED!!!
zaz
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
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:
Take a try.
Best Regards,
Barry
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional