cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joshieboy
Post Partisan
Post Partisan

Sending Email based on modified field

I have a flow setup where I would like to send an email to a specific group of users if a record has been modified and a specific value entered in a field.  So when forms are submitted, they are assigned to individuals for action.  There are two fields on the form that should trigger the action.  

 

1.  Is submission an IIN - this is a Yes/No dropdown

2.  Incident type Sub Category - this is also a dropdown and has multiple values

 

I want when a form is modified, if the Is Submission an IIN field equals Yes, and Incident type Sub Category equals "First Aid" or "Medical Treatment", then send an email to lets call it Group A users.  

 

If however Is Submission an IIN field equals Yes, and anything else from the Incident type Sub Category field is selected, then send an email to lets call it Group B users.

 

Finally, if the Is Submission an IIN field equals No, send an email to the person who created the form.  Once someone selects no, they will not advance to the Incident type sub category field so there is no need to include this piece. I created a separate flow for this one where its almost the same as the screenshot below - when an item or file is modified, if Is Submission an IIN equals No send an email to Created by.  This seems to work but it also sends another email to the group A which I am not sure why as the groups trigger should be based on "Yes" and not No.  I am thinking that all conditions can be satisfied with one flow but would really like some guidance on this.  Thanks in advance.

 

 

Below is a screenshot of my attempt for the Yes (Medical Treatment or First Aid) piece. IINFlow.jpg

8 REPLIES 8
powercorner
Continued Contributor
Continued Contributor

Hello @joshieboy ,

 

your condition inside the flow does not fit to your described text:

 

I want when a form is modified, if the Is Submission an IIN field equals Yes, and Incident type Sub Category equals "First Aid" or "Medical Treatment", then send an email to lets call it Group A users.   

 

So what you want is an (Submission = Yes AND Incident = First Aid) OR (Submission = Yes AND Incident = Medical Treatment)

 

but your condition in the flow says:  
(Submission = Yes AND Incident = Medical Treatment AND (Submission = Yes OR Incident = First Aid) )

So the first aid is not really counting in your logical expression. your condition should look like this:

powercorner_0-1621796398273.png

 

Tell me if this helped you.

 

With regards

Kevin 

 

Hi @powercorner - thanks for the feedback.  I tried this and no matter which option I select, the workflow still sends the email to the same group.  If I select First Aid or Medical Treatment or any other option from the dropdown, it goes to the same group.  Although I had two different email groups.  One for If Yes and one for If No.  Below is my screenshot of what you suggested. 

 

Condition.jpg

hey there,

 

what do you exactly mean? is this condition always true? Can you show me the runtime outputs? just to make sure. can you store the sharepoint data in 2 variables to have a clearness over the output?

Hi @powercorner  - Can I email the runtime file to you?

Also, there are several options on the dropdown - eg:   Process Upset, Equipment Failure, LOPC, Property Damage, etc.  inclusive of First Aid and Medical Treatment and several others.  The workflow should send the email to a specific group only if First Aid or Medical Treatment is selected from the dropdown.  If anything else is selected from the dropdown, it should go to another group of users.  

 

Can you walk me through the two variables part.  Thanks. 

hey @joshieboy ,

 

all right. So with emailing a group you mean that the outcome of the condition is true or false. And when its true your send a mail to group A and when its false you send a mail to group B?

 

I would try to build a copy of your flow and SP list. give me a second.

 

With regards

Kevin

 

powercorner
Continued Contributor
Continued Contributor

oh man @joshieboy 

 

now I see your problem. You have to use true instead of Yes in the condition:

powercorner_0-1621967565183.png

(sry its in german -> oder = or , und = and, ist gleich = equals )

 

you can find the info in the output of your sharepoint trigger:

powercorner_2-1621967858033.png

 

powercorner_1-1621967841885.png

 

 

With regards

Kevin

Hi @powercorner - your screenshot helps.  See mine below.  I am not sure why for Is Submission an IIN, I am not seeing a value in my raw input.  Can you provide some guidance on this?  

 

{"headers":{"Transfer-Encoding":"chunked","Retry-After":"21600","Vary":"Origin,Accept-Encoding","X-SharePointHealthScore":"1","X-MS-SPConnector":"1","X-SP-SERVERSTATE":"ReadOnly=0","DATASERVICEVERSION":"3.0","SPClientServiceRequestDuration":"154","SPRequestGuid":"38a34c06-8a71-4f27-980e-7b48ccd4acb8","request-id":"38a34c06-8a71-4f27-980e-7b48ccd4acb8","MS-CV":"BkyjOHGKJ0+YDntIzNSsuA.0","Strict-Transport-Security":"max-age=31536000","X-FRAME-OPTIONS":"SAMEORIGIN","Content-Security-Policy":"frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com;","MicrosoftSharePointTeamServices":"16.0.0.21312","X-Content-Type-Options":"nosniff","X-MS-InvokeApp":"1; RequireReadOnly","Timing-Allow-Origin":"*","x-ms-apihub-cached-response":"true","Cache-Control":"max-age=0, private","Date":"Wed, 26 May 2021 15:42:10 GMT","Location":"https://flow-apim-msmanaged-na-eastus2-01.azure-apim.net/apim/sharepointonline/0aa531bd2c2647b7accfa484cb7ade15/datasets/https%253A%252F%252Fngc1.sharepoint.com%252Fhse_security%252Fiinportal/tables/f335fc5d-4c16-47e6-81ba-52edc5e39ee3/onchangeditems?triggerstate=MTszO2YzMzVmYzVkLTRjMTYtNDdlNi04MWJhLTUyZWRjNWUzOWVlMzs2Mzc1NzY0MDUzMDc2NzAwMDA7NDA1MjM4MTcz","P3P":"CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"","X-AspNet-Version":"4.0.30319","X-Powered-By":"ASP.NET","Content-Type":"application/json; charset=utf-8","Expires":"Tue, 11 May 2021 15:42:10 GMT","Last-Modified":"Wed, 26 May 2021 15:42:10 GMT","Content-Length":"4738"},"body":{"@odata.etag":"\"2\"","ItemInternalId":"100","ID":100,"Created":"2021-05-26T15:39:53Z","Author":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser","Claims":"i:0#.f|membership|jgaskin@ngc.co.tt","DisplayName":"Joshua Gaskin","Email":"joshua.gaskin@ngc.co.tt","Picture":"https://ngc1.sharepoint.com/hse_security/iinportal/_layouts/15/UserPhoto.aspx?Size=L&AccountName=joshua.gaskin@ngc.co.tt","Department":"Information Technology Department","JobTitle":"Business Analyst"},"Author#Claims":"i:0#.f|membership|jgaskin@ngc.co.tt","Division":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":26,"Value":"Technology and Innovation"},"Division#Id":26,"Department":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":50,"Value":"Enterprise Planning Implementation and Transformation"},"Department#Id":50,"IncidentLocation":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":6,"Value":"Pacific Place"},"IncidentLocation#Id":6,"FirstLevelReviewer":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser","Claims":"i:0#.f|membership|jgaskin@ngc.co.tt","DisplayName":"Joshua Gaskin","Email":"joshua.gaskin@ngc.co.tt","Picture":"https://ngc1.sharepoint.com/hse_security/iinportal/_layouts/15/UserPhoto.aspx?Size=L&AccountName=joshua.gaskin@ngc.co.tt","Department":"Information Technology Department","JobTitle":"Business Analyst"},"FirstLevelReviewer#Claims":"i:0#.f|membership|jgaskin@ngc.co.tt","IncidentDateandTime":"2021-05-25T09:00:00Z","DescriptionofIncident":"May 26th test 1 for Incident type","ImmediateActionstobetaken":"May 26th test 1 for Incident type","On_x002d_Time_x0020_Reporting":"No","Date_x0020_Difference":"1.27769675925811","ImpactLevel":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":2,"Value":"3"},"ImpactLevel#Id":2,"Likelihood":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":3,"Value":"4"},"Likelihood#Id":3,"Outcome":"Medium (12)","Grade":"12","ImpactxLikelihood":"Moderate/Likely","Investigation_x0020_Level":"2","Incidenttype":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Accident"},"Incidenttype#Id":0,"Incidenttype_x002d_SubCategory":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":-1,"Value":"First Aid"},"Incidenttype_x002d_SubCategory#Id":-1,"Investigation_x0020_Status":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":3,"Value":"Open"},"Investigation_x0020_Status#Id":3,"Safety_x0020_Critical_x0020_Equi":"First Aid submission.  This should go to gmail account","Is_x0020_submission_x0020_an_x00":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Yes"},"Is_x0020_submission_x0020_an_x00#Id":0,"Date_x0020_and_x0020_Time_x0020_":"2021-05-25T09:00:00Z","AmorPm":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"AM"},"AmorPm#Id":0,"Modified":"2021-05-26T15:41:40Z","Editor":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser","Claims":"i:0#.f|membership|jgaskin@ngc.co.tt","DisplayName":"Joshua Gaskin","Email":"joshua.gaskin@ngc.co.tt","Picture":"https://ngc1.sharepoint.com/hse_security/iinportal/_layouts/15/UserPhoto.aspx?Size=L&AccountName=joshua.gaskin@ngc.co.tt","Department":"Information Technology Department","JobTitle":"Business Analyst"},"Editor#Claims":"i:0#.f|membership|jgaskin@ngc.co.tt","IINNumber":"IIN","{Identifier}":"Lists%252fInitial%2bIncident%2bNotification%252f100_.000","{IsFolder}":false,"{Thumbnail}":{"Large":null,"Medium":null,"Small":null},"{Link}":"https://ngc1.sharepoint.com/hse_security/iinportal/_layouts/15/listform.aspx?PageType=4&ListId=f335fc5d%2D4c16%2D47e6%2D81ba%2D52edc5e39ee3&ID=100&ContentTypeID=0x010074CD10EF2285B84C85B5791C9A6393C6009732AD8FC4D3E04E9293C778488500C6","{Name}":"","{FilenameWithExtension}":"","{Path}":"Lists/Initial Incident Notification/","{FullPath}":"Lists/Initial Incident Notification/100_.000","{ContentType}":{"@odata.type":"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedContentType","Id":"0x010074CD10EF2285B84C85B5791C9A6393C6009732AD8FC4D3E04E9293C778488500C6","Name":"Item"},"{ContentType}#Id":"0x010074CD10EF2285B84C85B5791C9A6393C6009732AD8FC4D3E04E9293C778488500C6","{HasAttachments}":false,"{VersionNumber}":"2.0","{TriggerWindowStartToken}":"MTszO2YzMzVmYzVkLTRjMTYtNDdlNi04MWJhLTUyZWRjNWUzOWVlMzs2Mzc1NzY0MDQyMzIxMDAwMDA7NDA1MjM3Mzk5","{TriggerWindowEndToken}":"MTszO2YzMzVmYzVkLTRjMTYtNDdlNi04MWJhLTUyZWRjNWUzOWVlMzs2Mzc1NzY0MDUzMDc2NzAwMDA7NDA1MjM4MTcz"}}

 

Hey @joshieboy ,

 

this is how an choice field normally looks in SharePoint:  "Is_x0020_submission_x0020_an_x00":{"@odata.type":"#Microso
ft.Azure.Connectors.SharePoint.SPListExpandedReference","Id":0,"Value":"Yes"}

See here:

powercorner_0-1622052352875.pngpowercorner_1-1622052365098.png

 

are you sure its not a choice field? In case if its possible just delete that "broken" column from your SP List and create a new one (Yes/No) with the same name.

 

Otherwise you can select the triggerOutput()['Is_x0020_submission_x0020_an_x00/Value'] in the condition

powercorner_2-1622052501683.png

 

This should help 4 sure!

 

With regards

Kevin

 

 

Helpful resources

Announcements

Exclusive LIVE Community Event: Power Apps Copilot Coffee Chat with Copilot Studio Product Team

It's time for the SECOND Power Apps Copilot Coffee Chat featuring the Copilot Studio product team, which will be held LIVE on April 3, 2024 at 9:30 AM Pacific Daylight Time (PDT).     This is an incredible opportunity to connect with members of the Copilot Studio product team and ask them anything about Copilot Studio. We'll share our special guests with you shortly--but we want to encourage to mark your calendars now because you will not want to miss the conversation.   This live event will give you the unique opportunity to learn more about Copilot Studio plans, where we’ll focus, and get insight into upcoming features. We’re looking forward to hearing from the community, so bring your questions!   TO GET ACCESS TO THIS EXCLUSIVE AMA: Kudo this post to reserve your spot! Reserve your spot now by kudoing this post.  Reservations will be prioritized on when your kudo for the post comes through, so don't wait! Click that "kudo button" today.   Invitations will be sent on April 2nd.Users posting Kudos after April 2nd at 9AM PDT may not receive an invitation but will be able to view the session online after conclusion of the event. Give your "kudo" today and mark your calendars for April 3, 2024 at 9:30 AM PDT and join us for an engaging and informative session!

Tuesday Tip: Unlocking Community Achievements and Earning Badges

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!     THIS WEEK'S TIP: Unlocking Achievements and Earning BadgesAcross the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. These badges each signify a different achievement--and all of those achievements are available to any Community member! If you're a seasoned pro or just getting started, you too can earn badges for the great work you do. Check out some details on Community badges below--and find out more in the detailed link at the end of the article!       A Diverse Range of Badges to Collect The badges you can earn in the Community cover a wide array of activities, including: Kudos Received: Acknowledges the number of times a user’s post has been appreciated with a “Kudo.”Kudos Given: Highlights the user’s generosity in recognizing others’ contributions.Topics Created: Tracks the number of discussions initiated by a user.Solutions Provided: Celebrates the instances where a user’s response is marked as the correct solution.Reply: Counts the number of times a user has engaged with community discussions.Blog Contributor: Honors those who contribute valuable content and are invited to write for the community blog.       A Community Evolving Together Badges are not only a great way to recognize outstanding contributions of our amazing Community members--they are also a way to continue fostering a collaborative and supportive environment. As you continue to share your knowledge and assist each other these badges serve as a visual representation of your valuable contributions.   Find out more about badges in these Community Support pages in each Community: All About Community Badges - Power Apps CommunityAll About Community Badges - Power Automate CommunityAll About Community Badges - Copilot Studio CommunityAll About Community Badges - Power Pages Community

Tuesday Tips: Powering Up Your Community Profile

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!   This Week's Tip: Power Up Your Profile!  🚀 It's where every Community member gets their start, and it's essential that you keep it updated! Your Community User Profile is how you're able to get messages, post solutions, ask questions--and as you rank up, it's where your badges will appear and how you'll be known when you start blogging in the Community Blog. Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile.     Password Puzzles? No Problem! Find out how to sync your Azure AD password with your community account, ensuring a seamless sign-in. No separate passwords to remember! Job Jumps & Email Swaps Changed jobs? Got a new email? Fear not! You'll find out how to link your shiny new email to your existing community account, keeping your contributions and connections intact. Username Uncertainties Unraveled Picking the perfect username is crucial--and sometimes the original choice you signed up with doesn't fit as well as you may have thought. There's a quick way to request an update here--but remember, your username is your community identity, so choose wisely. "Need Admin Approval" Warning Window? If you see this error message while using the community, don't worry. A simple process will help you get where you need to go. If you still need assistance, find out how to contact your Community Support team. Whatever you're looking for, when it comes to your profile, the Community Account Support Knowledge Base article is your treasure trove of tips as you navigate the nuances of your Community Profile. It’s the ultimate resource for keeping your digital identity in tip-top shape while engaging with the Power Platform Community. So, dive in and power up your profile today!  💪🚀   Community Account Support | Power Apps Community Account Support | Power AutomateCommunity Account Support | Copilot Studio  Community Account Support | Power Pages

Super User of the Month | Chris Piasecki

In our 2nd installment of this new ongoing feature in the Community, we're thrilled to announce that Chris Piasecki is our Super User of the Month for March 2024. If you've been in the Community for a while, we're sure you've seen a comment or marked one of Chris' helpful tips as a solution--he's been a Super User for SEVEN consecutive seasons!   Since authoring his first reply in April 2020 to his most recent achievement organizing the Canadian Power Platform Summit this month, Chris has helped countless Community members with his insights and expertise. In addition to being a Super User, Chris is also a User Group leader, Microsoft MVP, and a featured speaker at the Microsoft Power Platform Conference. His contributions to the new SUIT program, along with his joyous personality and willingness to jump in and help so many members has made Chris a fixture in the Power Platform Community.   When Chris isn't authoring solutions or organizing events, he's actively leading Piasecki Consulting, specializing in solution architecture, integration, DevOps, and more--helping clients discover how to strategize and implement Microsoft's technology platforms. We are grateful for Chris' insightful help in the Community and look forward to even more amazing milestones as he continues to assist so many with his great tips, solutions--always with a smile and a great sense of humor.You can find Chris in the Community and on LinkedIn. Thanks for being such a SUPER user, Chris! 💪 🌠  

Tuesday Tips: Community Ranks and YOU

TUESDAY TIPS are our way of communicating helpful things we've learned or shared that have helped members of the Community. Whether you're just getting started or you're a seasoned pro, Tuesday Tips will help you know where to go, what to look for, and navigate your way through the ever-growing--and ever-changing--world of the Power Platform Community! We cover basics about the Community, provide a few "insider tips" to make your experience even better, and share best practices gleaned from our most active community members and Super Users.   With so many new Community members joining us each week, we'll also review a few of our "best practices" so you know just "how" the Community works, so make sure to watch the News & Announcements each week for the latest and greatest Tuesday Tips!This Week: Community Ranks--Moving from "Member" to "Community Champion"   Have you ever wondered how your fellow community members ascend the ranks within our community? What sets apart an Advocate from a Helper, or a Solution Sage from a Community Champion? In today’s #TuesdayTip, we’re unveiling the secrets and sharing tips to help YOU elevate your ranking—and why it matters to our vibrant communities. Community ranks serve as a window into a member’s role and activity. They celebrate your accomplishments and reveal whether someone has been actively contributing and assisting others. For instance, a Super User is someone who has been exceptionally helpful and engaged. Some ranks even come with special permissions, especially those related to community management. As you actively participate—whether by creating new topics, providing solutions, or earning kudos—your rank can climb. Each time you achieve a new rank, you’ll receive an email notification. Look out for the icon and rank name displayed next to your username—it’s a badge of honor! Fun fact: Your Community Engagement Team keeps an eye on these ranks, recognizing the most passionate and active community members. So shine brightly with valuable content, and you might just earn well-deserved recognition! Where can you see someone’s rank? When viewing a post, you’ll find a member’s rank to the left of their name.Click on a username to explore their profile, where their rank is prominently displayed. What about the ranks themselves? New members start as New Members, progressing to Regular Visitors, and then Frequent Visitors.Beyond that, we have a categorized system: Kudo Ranks: Earned through kudos (teal icons).Post Ranks: Based on your posts (purple icons).Solution Ranks: Reflecting your solutions (green icons).Combo Ranks: These orange icons combine kudos, solutions, and posts. The top ranks have unique names, making your journey even more exciting! So dive in, collect those kudos, share solutions, and let’s see how high you can rank!  🌟 🚀   Check out the Using the Community boards in each of the communities for more helpful information!  Power Apps, Power Automate, Copilot Studio & Power Pages

Find Out What Makes Super Users So Super

We know many of you visit the Power Platform Communities to ask questions and receive answers. But do you know that many of our best answers and solutions come from Community members who are super active, helping anyone who needs a little help getting unstuck with Business Applications products? We call these dedicated Community members Super Users because they are the real heroes in the Community, willing to jump in whenever they can to help! Maybe you've encountered them yourself and they've solved some of your biggest questions. Have you ever wondered, "Why?"We interviewed several of our Super Users to understand what drives them to help in the Community--and discover the difference it has made in their lives as well! Take a look in our gallery today: What Motivates a Super User? - Power Platform Community (microsoft.com)

Users online (5,985)