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 / Best to use Switch or ...
Power Automate
Unanswered

Best to use Switch or a Condition for this scenario??

(0) ShareShare
ReportReport
Posted on by 1,146

Hi,

I have a PowerApp with a toggle.

I want to set the flow to send an email depending on the toggle setting.  I already have a condition.
So it be two fold.  If toggle equals Yes send an email to a mailbox, If no don't send the email to this mailbox.

The condition that is already there still needs to happen irrespective of the toggle setting.

What is the best option or is there another way??

Regards

Chris

ClarkyPA365_0-1648462789454.png

 

Categories:
I have the same question (0)
  • jnernst Profile Picture
    166 on at

    Try this:

    "When an item is Created or Modified" Trigger

    Use Control Condition. Use the "Toggle Value of item created or Modified" as First Reference object.

    Make it "Equal" true.

    Now it can send the email. But only if the item is Toggled as yes.

    After it sends an email, have your flow "Update" the "Toggle Value of the item created or Modified" back to false, no, or off.

     

    Let me know how it goes.

  • Chris1968 Profile Picture
    1,146 on at

    Hi @jnernst 

     

    Thank you for your reply.

    Would this flow still be able to send an email to the other people who will need it?

    Scenario is

    Employee calls to say they are not coming in for their shift or shifts.  We work 24/7.

    Depending on who takes and records the call, may not be their line manager.  So an email is sent to the line manager with relevant details.
    If the absences is due to Covid, (Toggle in app will be set to Yes / true) I need the email to also be sent to another team.  (Mailbox).

    The condition I have already does this so just need to add that additional condition 

     

    Regards

     

    Chris

  • jnernst Profile Picture
    166 on at

    Gotcha, If they toggle is yes, send it to both your line manager and the additional team.

     

    If not, just send it to the line manager!

     

    So, either way in the control if statement the line manager will get the email.

    The only way the toggle will affect it is by having the email go to the additional team!

     

    I hope this makes sense to you

     

    Good luck

     

    Josh

  • Chris1968 Profile Picture
    1,146 on at

    HI Josh,

    That's it.😊  
    So can I just add another condition into the existing one?

    If so what will the logic be??
    Regards

     

    Chris

  • jnernst Profile Picture
    166 on at

    jnernst_0-1648652328049.png

    I hope this reference picture helps make sense of everything. The terminate is not necessary, but I like putting it on the end of my code to ensure I don't have any looping... it seems to happen without reason in power automate sometimes.

  • Chris1968 Profile Picture
    1,146 on at

    Hi Josh,

    Thanks for this.
    Sorry I seem to be missing little bits out or not explaining it properly.

    There is a scenario where the absences maybe recorded by a Team leader, Night Co-ordinator who is not the direct line manager of the employee.  In this case I've set the email of the line managers to populate in the absence row.
    The condition I'm using sends the email to the line manager in this scenario,  but I also want if the Covid toggle is set to Yes to go to the Additional Team. 

    Hopefully explained it a bit better😊

    Regards

     

    Chris

  • jnernst Profile Picture
    166 on at

    Not sure what the absence row is...

    The picture I had sent covers the filter part of your flow, still.

    You will send an email, regardless. 

     

    The filter meets this need:

    "The condition I'm using sends the email to the line manager in this scenario,  but I also want if the Covid toggle is set to Yes to go to the Additional Team."

  • Verified answer
    Chris1968 Profile Picture
    1,146 on at

    Hi,

    Getting myself confused with the need to use my condition also, so now I can see, just using the toggle function as the condition.

    I'll try it and let you know 😊

    Regards

    Chris 

  • jnernst Profile Picture
    166 on at

    If it ended up working, could you please give me a thumbs up!

     

    Much appreciated!

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