cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AVH
Level: Powered On

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
Community Support Team
Community Support Team

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.
AVH
Level: Powered On

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

Highlighted
Creative_Sense
Level: Powered On

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

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,166)