cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Can you add a case to a switch case that is true when no value is filled in?

Hi all, 

 

I'm having some issues with a flow. I have reached the boundaries of my flow capabilities. I have used too many nested if statements (9, whereas the maximum number is 8). So I'm looking to remove some redundant actions.

 

One of those actions is an if statement that says true when a certain field is empty (@null). When the field is not empty, I added a switch case that states all the possible values for that field.

 

Now I was wondering if I could just add a case to my switch case that is true when that field is empty. It is not possible to use dynamic content or expressions in the switch case, that's why I haven't been able to figure this out yet. 

 

I tried something like: 

 

zeth.PNG

But that doesn't seem to work. 

 

Any other suggestions? 

 

Thanks in advance. 

 

Best regards, 

AVH

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Can you add a case to a switch case that is true when no value is filled in?

Hi @AVH,

 

Do you want to check if a filed is blank using Switch case in the flow? I am afraid that it might be not possible to use a null value in the Switch, because value of type String, Integer are expected at here.

 

Please use the if statement in your flow, I assume it should be a good choice for your scenario.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate I
Advocate I

Re: Can you add a case to a switch case that is true when no value is filled in?

Hi @v-yamao-msft

 

Thanks for your reply. 

 

That is indeed what I am trying to do. 

I want to avoid using the if statement because I already have too many nested if statements in my flow.

 

Is there no other way to check if a field is blank other than with an if statement?

 

Best regards, 

AVH

Advocate II
Advocate II

Re: Can you add a case to a switch case that is true when no value is filled in?

@AVH I know this is an older topic but incase this is still a need or anyone else is wondering the same thing...

 

I was able to add a Compose first where I converted the value to a string and then evaluated the output from the compose. 

 

Hope that helps! 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,171)