web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Is it possible to do a...
Power Automate
Answered

Is it possible to do advanced switch case?

(0) ShareShare
ReportReport
Posted on by 34

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. 

 

Categories:
I have the same question (0)
  • Verified answer
    DouglasRomao Profile Picture
    224 Most Valuable Professional on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 382

#2
Valantis Profile Picture

Valantis 370

#3
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

Last 30 days Overall leaderboard