Loop through four names and then start again


Badge +2

Hi, I have a workflow that sort of functions like a help desk. On another list, I have four names of people who are assigned tickets in rotation. Let's call them A, B, C, D. For the first one that comes in, person A is up, so the workflow pulls in their name and sends them an email. 2nd - B and so on, until ticket 5 when it restarts. 

 

I've even called Nintex for this and they couldn't do it. But I don't believe it's impossible. 


2 replies

Userlevel 6
Badge +22
Hi,

I answered this scenario about 6 months ago but damned if i can fined the post among my 1300+ posts on this community.

Basically it goes like this.
You have a list with the for names and a column which keeps track of who's turn it is to get the next task. I'd use a Yes/No column for simplicity.

When the workflow runs it queries this list to find out who gets the next task by looking for a yes and then updates the list to change that user from yes to no and the next user from no to yes.
The users ID's will be from 1 to 4 and when the ID is 4 then 4 is changed to no and 1 is changed to yes.
Badge +4

Hi ,


try this 


 



















































































Title


Use this for Ticketno



Number



HelpDeskUser (person or group



Assigned


(Boolean)



Modified



1100001



1



USER A



YES



2:10:01 PM



1100002



2



USER B



YES



2:10:02 PM



1100003



3



USER C



YES



2:10:03 PM



1100004



4



USER D



YES



2:10:04 PM



1100005



5



USER E



YES



2:10:05 PM



1100006



1



USER A



YES



2:10:06 PM



1100007



2



USER B



YES



2:10:07 PM



1100008



3



USER C



YES



2:10:08 PM



1100009



4



USER D



YES



2:10:09 PM



 



 



 



 



 



 


 


 


Step 1 : Loop through the last modified  5 items in asc order the list  (in the above list User E)


             And the number is 5  then


               Set  Assigned = “Yes”


             Set  Number = 5


               Based on the Number pick the User using lookup column or from other list using Query list


            Then assign in to that user .


 





































































Title


Use this for Ticketno



Number



HelpDeskUser (person or group



Assigned


(Boolean)



Modified



1100001



1



USER A



YES



2:10:01 PM



1100002



2



USER B



YES



2:10:02 PM



1100003



3



USER C



YES



2:10:03 PM



1100004



4



USER D



YES



2:10:04 PM



1100005



5



USER E



YES



2:10:05 PM



1100006



1



USER A



YES



2:10:06 PM



1100007



2



USER B



YES



2:10:07 PM



 



 



 



 



 



 


 


Step 1 : Loop through the last modified  5 items in asc order the list  (in the above list User E)


             And the number is 3  then


               Based on the Number pick the User using lookup column or from other list using Query list


            Then assign in to that user .


               Set  Assigned = “Yes”


              Set Number =3


     


Assigned field is optional though


Hope this helps ..

Reply