cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Canadiansal
Helper V
Helper V

Automation

I have a Sharepoint List - very simple. With 3 Columns, Mentor, Mentee and Subject

Canadiansal_0-1614110142219.png

Is there a way to automate the process so that when a User Selects that they are a Mentee, that an email will be sent to the  Mentors ? So in this case there are 2 persons who are willing to be mentors for Accounting, and 1 person wants to be mentored (Mentee), any ideas? Is this the best way to set up my data or Should I have a Single Column with a Mentor/Mentee Choice?

2 ACCEPTED SOLUTIONS

Accepted Solutions
rubin_boer
Super User
Super User

hi @Canadiansal 

I build a collection called mentorship to keep all entries, for both mentors and mentees.

ClearCollect(Mentorship,{Subject:"",Role:"",Applicant:""})

 

I added three dropdows

  1. Applicant and added 4 names to it
    1. ["Rubin","Jack","Dean","Lisa"] //this will be a person choice in your case
  2. Subject and added two subjects
    1. ["Accounting","English"]
  3. Roles: two roles
    1. ["Mentor","Mentee"]

I added a button that saves the entries and when the roles are a mentee it emails everyone that is a mentor for that subject

Entry button onselect = 

Patch(Mentorship,Defaults(Mentorship),{Subject: Dropdown1.SelectedText.Value ,Role: Dropdown1_1.SelectedText.Value,Applicant:Dropdown1_2.SelectedText.Value});
If(Dropdown1_1.SelectedText.Value = "Mentee",
ForAll(Mentorship, If(And(Role = "Mentor", Subject = Dropdown1.SelectedText.Value),Collect(_Email,Applicant & "@someplace.com"))))

 

below i added three mentors as can be seen in the gallery (item = mentorship) and below that is the email that will be send when i selected the mentee. notice that Lisa is not being emailed

 

rubin_boer_0-1614275101634.png

 

Gallery1 Item = Mentorship

Gallery2 Item = _Email

 

Jope this helps

 

View solution in original post

rubin_boer
Super User
Super User

hi @Canadiansal you can replace the Collect in If(Dropdown1_1.SelectedText.Value = "Mentee",
ForAll(Mentorship, If(And(Role = "Mentor", Subject = Dropdown1.SelectedText.Value),Office365Outlook.SendEmailV2("emailaddress@some.com","Subject","Message here")))) 

 

View solution in original post

7 REPLIES 7
rubin_boer
Super User
Super User

hi @Canadiansal consider the list having Person (People) | Subject (Choice) |  Type (Choice)

when a user makes an entry it's for a subject and either mentor or mentee. if mentee is chosen you can fire an email to all the people which have type mentor for that subject in the list.

 

if this is what you are looking for, we can work on it. hope it helps

 
 
Canadiansal
Helper V
Helper V

Yes, thats exactly what I am trying to do. Haven't been on one lately, but I suspect  dating sites work on the same principles😀

Did you say you have some insights into this?

rubin_boer
Super User
Super User

hi @Canadiansal sure we can do this, i have to jump onto something else quick and can get to this in an hours' time

 
rubin_boer
Super User
Super User

hi @Canadiansal 

I build a collection called mentorship to keep all entries, for both mentors and mentees.

ClearCollect(Mentorship,{Subject:"",Role:"",Applicant:""})

 

I added three dropdows

  1. Applicant and added 4 names to it
    1. ["Rubin","Jack","Dean","Lisa"] //this will be a person choice in your case
  2. Subject and added two subjects
    1. ["Accounting","English"]
  3. Roles: two roles
    1. ["Mentor","Mentee"]

I added a button that saves the entries and when the roles are a mentee it emails everyone that is a mentor for that subject

Entry button onselect = 

Patch(Mentorship,Defaults(Mentorship),{Subject: Dropdown1.SelectedText.Value ,Role: Dropdown1_1.SelectedText.Value,Applicant:Dropdown1_2.SelectedText.Value});
If(Dropdown1_1.SelectedText.Value = "Mentee",
ForAll(Mentorship, If(And(Role = "Mentor", Subject = Dropdown1.SelectedText.Value),Collect(_Email,Applicant & "@someplace.com"))))

 

below i added three mentors as can be seen in the gallery (item = mentorship) and below that is the email that will be send when i selected the mentee. notice that Lisa is not being emailed

 

rubin_boer_0-1614275101634.png

 

Gallery1 Item = Mentorship

Gallery2 Item = _Email

 

Jope this helps

 

View solution in original post

Canadiansal
Helper V
Helper V

Thank you - this is great. What would be the syntax of the email command? Can we do this using powerautomate as well?

 

rubin_boer
Super User
Super User

hi @Canadiansal you can replace the Collect in If(Dropdown1_1.SelectedText.Value = "Mentee",
ForAll(Mentorship, If(And(Role = "Mentor", Subject = Dropdown1.SelectedText.Value),Office365Outlook.SendEmailV2("emailaddress@some.com","Subject","Message here")))) 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,577)