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 Platform Community / Forums / Power Automate / Switch Action does not...
Power Automate
Unanswered

Switch Action does not working

(0) ShareShare
ReportReport
Posted on by 34

Hello, I created a variable that contains an if condition.

then added this variable to a Switch Action and here it looks in which case it fits.

if I don't put any action in this case then it works, so it already recognizes that it belongs in this case as soon as there is an action in the case it stops.

For Example.

when it fits the "30000" Case, another Switch has to be done. 

and I want to add an action to it, my flow gives me this error:

The execution of template action 'Material_Status' failed: the comparison of scope expression evaluation result to case branch value failed 'Template language function 'strongEquals' expects parameters of same type, but found 'String,Integer' distinct types.'.

I've added my Flow wen its working/not working & My Condition and would appreciate any help.

 

 

aleyna6060_1-1680523937687.png

This is my Condition as a Variable: 

if(lessOrEquals(triggerOutputs()?['body/ScrapValue'],5000),'5000',if(lessOrEquals(triggerOutputs()?['body/ScrapValue'],30000),'30000',if(lessOrEquals(triggerOutputs()?['body/ScrapValue'],100000),'100000','100001')))

 

 

aleyna6060_0-1680523860896.png

It work here, because its outside the switch.

 

aleyna6060_2-1680524013354.png

and here it does not working, its inside the Switch.

But I have to do it IN the switch because there are different actions for each value.

PS: it doesn't work with other actions either

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @aleyna6060 ,

    Can you save the value outside switch in a variable and then reference the variable inside switch?

     

  • aleyna6060 Profile Picture
    34 on at

    @SudeepGhatakNZ 

    I don't know what you mean exactly. I can't insert the variable into the case. I can only write down the number.

    my condition works, the problem is more that he does not carry out the actions in the case. 

  • aleyna6060 Profile Picture
    34 on at

    @SudeepGhatakNZ 

    Thanks for your answer. I can't insert a variable into the case.

    In the flow, the case is selected correctly anyway, the point is that it does not carry out and stops the actions in the flow

  • Chriddle Profile Picture
    8,436 Super User 2025 Season 2 on at

    Pls check your condition:

    if(lessOrEquals(triggerOutputs()?['body/ScrapValue'],5000),'5000',if(lessOrEquals(triggerOutputs()?['body/ScrapValue'],30000),'30000',if(lessOrEquals(triggerOutputs()?['body/ScrapValue'],100000),'100000','100001')))

    Are you sure you want the result of this action to be a string?

  • Verified answer
    aleyna6060 Profile Picture
    34 on at

    Hi, i solved my Problem. 

    the only Problem was - that the numbers are not written correctly. 

    5000 wrong --> "5000" right. 

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