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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Unanswered

Swith Control

(0) ShareShare
ReportReport
Posted on by

Hi Guys,

 

Can you help me please. Is it possible to use logical comparissons in a switch control for a flow like "greater than 0" or "less than 0"?

 

I appreciate your time and effort in advance!

 

Thanks!

 

Categories:
I have the same question (0)
  • GeorgiosG Profile Picture
    1,013 Super User 2024 Season 1 on at

    Hi @Anonymous ,

     

    it is possible if you use it with an if statement or something which has an output as string or int.

    The Switch Control expects to work with string or int. Therefore you can i.e. use an if clause where you can define the output. 

     

    if(greater(triggerBody()['number'],5),'Case1','Case2')

     

    You can also use Numbers like if(greater(triggerBody()['number'],5),1,2), then you have to adapt the Case blocks with 1 and two instead of "Case1".

     

    GeorgiosG_0-1651236045511.png

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @GeorgiosG ,

     

    Thanks for your respons! 

     

    I'm sorry I did not specify my question enough because what i want to do is put the logic in the case like this:

     

    Switch = Number

     

    Case 1 =  number is greater than 0 

    Case 2 = number is less than 0

    Case 3 = number equals 0

     

    Is this possible within a switch?

     

    Thanks again for your help!

  • Verified answer
    GeorgiosG Profile Picture
    1,013 Super User 2024 Season 1 on at

    Ok understood but this is not possible. You can insert a number or a text in the case boxes but not an expression. 

    It is more or less like a predefined expression  which always runs with equals. 

    I made some tests and entered expressions but this is not working. 

    Unfortunately you cannot insert expressions/logic in the cases, you have to use conditions instead.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard