cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kbarber
Advocate II
Advocate II

Increment Send To Email

Need help conceptualizing how to achieve my desired Flow...My team (only 3 of us) want to take turns handling requests that are entered into a SharePoint List.

 

Trigger: New SharePoint List item

Action: Increment through list of team members and send email with link to item.

 

sample member list:

  1. Jim
  2. Kurt
  3. Beth

so the first request comes through (item created), and the flow emails Jim.

second request comes through (item created), and the flow emails Kurt.

third request comes through (item created), and the flow emails Beth.

fourth request comes through (item created), and the flow emails Jim.

and so on

 

any ideas?

 

Thank you!!!

- Kurt

3 ACCEPTED SOLUTIONS

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

The most difficult portion of this is figuring out who is next in the rotation.  Since you are using a Trigger that fires on each item being created there is no easy way to track who was assigned the last item.  Here are several possibilties that should work.

  1. Divide the Item ID by 3 and take the remainder 
     mod(triggerBody()?['ID'],3)
  2. Store the integer of the last person used in the item itself and then lookup the last item then increment by 1
  3. Store the integer of the last person used in a different datasource, retrieve it in the Flow and increment by 1

Then assign the email using a Switch statement

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @kbarber ,

 

You could create a list to handle the current order of members. The default value of Count is 1.

43.PNG

  • Use variables to get the number of cases that all current members have processed.
  • Calculate the remainder of the variable with 3. If the result is equal to 0, the current order is user1. If it is equal to 1, the current order is user2. If it is equal to 2, the current order is user3.

44.PNG45.PNG

  • Then update the corresponding item to the user, the value of the Count field is increased by 1.

46.PNG

 

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

thanks so much for the great ideas.

 

I was able to implement the solution.  First I created an Excel (stored in the same SharePoint site) table with only one record; this table stores the previous assigned to person:

one record table.png

the Flow looks at the Name value and follows the Switch path to email the right person and then also updates the Name Value to the person that will be assigned the next Flow run:

posreqflow.png

 

I feel pretty good about the simplicity of the Flow.

Thanks again!

- Kurt

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User III
Dual Super User III

The most difficult portion of this is figuring out who is next in the rotation.  Since you are using a Trigger that fires on each item being created there is no easy way to track who was assigned the last item.  Here are several possibilties that should work.

  1. Divide the Item ID by 3 and take the remainder 
     mod(triggerBody()?['ID'],3)
  2. Store the integer of the last person used in the item itself and then lookup the last item then increment by 1
  3. Store the integer of the last person used in a different datasource, retrieve it in the Flow and increment by 1

Then assign the email using a Switch statement

 



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

v-bacao-msft
Community Support
Community Support

 

Hi @kbarber ,

 

You could create a list to handle the current order of members. The default value of Count is 1.

43.PNG

  • Use variables to get the number of cases that all current members have processed.
  • Calculate the remainder of the variable with 3. If the result is equal to 0, the current order is user1. If it is equal to 1, the current order is user2. If it is equal to 2, the current order is user3.

44.PNG45.PNG

  • Then update the corresponding item to the user, the value of the Count field is increased by 1.

46.PNG

 

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

thanks so much for the great ideas.

 

I was able to implement the solution.  First I created an Excel (stored in the same SharePoint site) table with only one record; this table stores the previous assigned to person:

one record table.png

the Flow looks at the Name value and follows the Switch path to email the right person and then also updates the Name Value to the person that will be assigned the next Flow run:

posreqflow.png

 

I feel pretty good about the simplicity of the Flow.

Thanks again!

- Kurt

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,351)