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 Aktion in Flow ...
Power Automate
Unanswered

Switch Aktion in Flow failed

(0) ShareShare
ReportReport
Posted on by 91

In my flow I have a multiple selection field in a sharpoint list with number values. Using the status e.g. 1001 and 1002 and others, I would like to copy the images to another library. For this I use function "Switch" in Powerautomate, unfortunately the switch action does not recognize numbers from the array. Unfortunately, the Expression result does not recognize the numerical values correctly. what is the problem?

 

SPO Library.png

 

Flow Powerautomate.png

Error Applay to each I.png

 

Error Applay to each II.png

 

Error Applay to each III.png

ParseJSON.png

 

Switch Output.png

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @TomTT 

     

    You can convert number to string with the help of an expression using string function:

    ManishSolanki_0-1712664865223.png

    Below expression needs to be added in the expression box as highlighted in the above screenshot:

    string(outputs('Compose_3'))

    But it looks like the flow had failed in some other action exists in the case '1001' block 

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • TomTT Profile Picture
    91 on at

    sorry it does not work

     

    Error.png

  • TomTT Profile Picture
    91 on at

    ActionConditionFailed. The execution of template action 'Send_an_email_notification_(V3)' failed: an unexpected exception encountered when evaluating branching condition.

     

    Doesn't that have to be an integer?

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @TomTT 

     

    The issue is with "Send an email" action. Please verify the values passed in different parameters like To, subject, body etc. You could also try "Send an email (V2)" action for sending an email:

    ManishSolanki_0-1712668096689.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Please share the screenshot of send an email action in edit mode.

     

     

  • Verified answer
    TomTT Profile Picture
    91 on at

    Error Send an email (V2).png

    Edit Mode.png

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @TomTT 

     

    Pls use the below expression in Switch textbox to convert status value from string to int:

    int(items('Apply_to_each')?['Value'])

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard