cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pladavm
Helper V
Helper V

Switch Feature For Things Other Than Just Equal

Noting we can only nest five times is it possible to use Switch feature for matching other than "equal" i.e.

Switch - From field of Email Contains:

John Smith or James Dean or Darren Martin

But they won't exactly match the From field because the From field would be John Smith <john.smith@gmail.com>

But I don't want to include this either because I might get emails from various domains so I just want it  pick up if the From field contains John Smith then continue follow etc...however if I use Switch function it is fixed on "equal" but John Smith won't equal John Smith <john.smith@gmail.com> is there a code to counter this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @pladavm,

 

Yes, using compose should be able to split the From field with the name and Email field:

For example, the following code:

"@first(split(triggerbody()['From'],'<'))"

49.PNG

Under Compsoe would show the result in the following way:

50.PNG

If you would like to use equal, make sure to include the double quotes with the name, for example:

If John Smith is the name you would like to use, then under the value field, use the:

"John Smith"

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-micsh-msft
Community Support
Community Support

Hi @pladavm,

 

Yes, using compose should be able to split the From field with the name and Email field:

For example, the following code:

"@first(split(triggerbody()['From'],'<'))"

49.PNG

Under Compsoe would show the result in the following way:

50.PNG

If you would like to use equal, make sure to include the double quotes with the name, for example:

If John Smith is the name you would like to use, then under the value field, use the:

"John Smith"

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,547)