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 / I can not set variable...
Power Automate
Unanswered

I can not set variable in switch case.

(0) ShareShare
ReportReport
Posted on by
 
 
 

Hello,

       I will be set variable "varApproverStep1" in switch case 1 but it have a error in the picture below.

       Please suggest me.

Thanks in advance.

Aor.

error.png

Categories:
I have the same question (0)
  • Gareth1 Profile Picture
    308 on at

    Hi @Anonymous 

    Are you able to double check that the variable is not the same one you are using in the switch condition?

     

    If you can send a screenshot through of the actions and I can attempt to reproduce it for you

     

    I created something similar and it seemed to work ok

  • Community Power Platform Member Profile Picture
    on at

    Hi,

         Action is the picture below.

         Variable in switch condition not same with set variable in switch condition.

          "varRegisterType" was used in switch condition and "varApproveStep1" will assign new value and error in set variable to "varApproveStep1"

    Thank you for your help.

    Aor.

      error2.png    

     
  • Gareth1 Profile Picture
    308 on at

    if you get rid of the double quotes around value in the Case Equals field and replace "01" with 01 , Do you get similar results

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi,

         Can I set value is number in switch condition?

    Thank you.

    Aor. 

  • Community Power Platform Member Profile Picture
    on at

    Hi, 

            If i change value to number in switch condition and it have a error in picture blow.

    Thank you.

    Aor.

     

    error3.png

  • Verified answer
    Gareth1 Profile Picture
    308 on at

    I was able to get it to work by the following

    Screen Shot 2020-02-07 at 9.17.25 pm.png

    I added a compose action at the end to see the results of both variables

    Screen Shot 2020-02-07 at 9.18.00 pm.png

     

    Does this work for you?

  • Community Power Platform Member Profile Picture
    on at

    Hi,

          This solution is work.

    Thank you very much for your help.

    Aor.

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