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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,537)