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 / Different emails based...
Power Automate
Suggested Answer

Different emails based on value in an Excel table

(0) ShareShare
ReportReport
Posted on by
Hello,
 
I want to send different emails to a number of people based on the value in a specific column (in this case column PC of the attached Excel), but in the Switch action I cannot get the Case actions to recognize the values. 
 
When I put in 119 (example) in the Equals field of the case the ForEach action fails and when I put '119' in the Equal field the flow runs till the end, but no mails are sent since the case action does not seem to recognise the value. 
 
Attached a copy of te Excel used and the flow. 
 
Hopefully someone can help me figure out how to get the Case action working. 
 
Thanks a lot!
 
Wim
Categories:
I have the same question (0)
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,204 Super User 2026 Season 1 on at
     
    Convert Excel Number to Text IN Switch "On" field, use string(items('Apply_to_each')?['PC']) expression. Excel numbers have hidden decimals ----- text fixes matching.
    ​
    Use Exact Case Values Put 119 (no quotes) in Case "Equals" field. Switch compares same data types now. Test with Compose action first to see real PC value.
    ​
    Check Run History Data Type Run flow, click failed ForEach. Check raw PC column value ---- copy exact format to Case. Often shows 119.0 not 119.
    ​
    Delete Switch Instead of Switch Replace with Conditions string(items('Apply_to_each')?['PC']) equals '119'. Copy for each value
     
    Note: Condition is more reliable than Switch
     
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
     

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
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard