cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
solisruj
Frequent Visitor

Is it possible to do advanced switch case?

Hi there, 

 

I was wondering if you could do an advanced expression using Microsoft flows switch case. 

 

Switch_Case.PNG

 Could I implement something like the following:

 

or(
if(@contains(@triggerBody()?['{FilenameWithExtension}'], <pattern 1>),variable = <pattern 1>),
if(@contains(@triggerBody()?['{FilenameWithExtension}'], <pattern 2>),variable = <pattern 2>),
if(@contains(@triggerBody()?['{FilenameWithExtension}'], <pattern 3>),variable = <pattern 3>),
if(@contains(@triggerBody()?['{FilenameWithExtension}'], <pattern 4>),variable = <pattern 4>),
)

 

So if a specific pattern is found, then a particular case can be executed. Would I also be able to do the same with File Content to search for patterns like command lines grep regex? 

 

I also wanted to know where I could learn more advanced syntax expressions/implementations for Logic Apps/Microsoft Flow aside from Microsofts Logic App Documentation section. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
douglasromao Kudo Kingpin
Kudo Kingpin

Re: Is it possible to do advanced switch case?

Hi @solisruj,

 

You could post this idea on https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas  this is a way for the team get it on the road map and implement this kind of feature.

 

Regards,

Douglas

View solution in original post

1 REPLY 1
Highlighted
douglasromao Kudo Kingpin
Kudo Kingpin

Re: Is it possible to do advanced switch case?

Hi @solisruj,

 

You could post this idea on https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas  this is a way for the team get it on the road map and implement this kind of feature.

 

Regards,

Douglas

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,906)