cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dhalpin
Helper III
Helper III

Switch: Default = "go to next"?

Hi all,

 

I am using Flow to watch 5 columns in a Sharepoint list ("Person 1", "Person 2", etc).  I have 1 switch per column, and everything works great unless a Switch is not activated.  If there switch doesn't find a "true" it fails - but I would like it to just skip to the next switch/evaluation.  I see the Default action in the switch, but I don't know how to set Default = skip to next step. 

 

Any advice?

 

SwitchQstn.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
dhalpin
Helper III
Helper III

I wasn't able to figure out the correct usage of Coalesce, so I just used a series of Condtionals.  Thank you anyway for your help @Pstork1 .

View solution in original post

4 REPLIES 4
Pstork1
Dual Super User III
Dual Super User III

Can you explain a bit more what you are trying to accomplish?  If none of the other cases match in a switch it will automatically use default, which will drop through to the next action if you don't put anything in it.

 

Are you actually testing 5 different variables using the switches?  Can you expand them and show the cases inside the switch?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
dhalpin
Helper III
Helper III

Thanks for the prompt reply @Pstork1 !

 

The 5 columns are "Choice" columns, and the choices are peoples' names.  This is a way to designate technicians that are working on a project.  I have PowerAutomate sending an email to each person if they're specified from the drop down. So:

 

Switch 1

If 'Tech 1' eq 'Bob' > send an email to bob@company.com
If 'Tech 1' eq 'Joe' > send an email to joe@company.com
If 'Tech 1' eq 'Jane' > send an email to jane@company.com

 

Switch 2

If 'Tech 2' eq 'Bob' > send an email to bob@company.com
If 'Tech 2' eq 'Joe' > send an email to joe@company.com
If 'Tech 2' eq 'Jane' > send an email to jane@company.com

 

Unfortunately if only column 1 is specified, the flow fails at Switch 2, saying it is Null.  It doesn't continue through Switch 2 to Switch 3.

Pstork1
Dual Super User III
Dual Super User III

When you put the value to be evaluated in each switch put it inside a coalesce() function.  Taht way if the value is null it will substitute the alternate value.  For example lets say Tech 2 is null

Coalesce(Tech2.Value, 'default')

will then evalutate the switch using 'default' not the null value for Tech2.  You can supply any default value you want.  Since there isn't a case for default it will fall through the default case.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
dhalpin
Helper III
Helper III

I wasn't able to figure out the correct usage of Coalesce, so I just used a series of Condtionals.  Thank you anyway for your help @Pstork1 .

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,434)