Forum Discussion
JeffPeterson1
4 years agoQrew Captain
Hi Mark!
It might help if I explain what I'm trying to do here.
I built an automation that is used to auto-assign work to a "preferred" rep.
In the 'Sites' table, I have fields to hold a 'preferred 1' 'preferred 2' and 'preferred 3' rep for a given site.
If a new child 'Site Visit' is created AND there is one or more Reps listed in the fields above, then that rep/reps will automatically get sent the job.
Now, I'm where I need a way to mass populate these 'preferred 1', 'preferred 2' and 'preferred 3' fields automatically, based on how many completed jobs have been performed at each site.
This will basically allow us to automatically route work to our preferred techs with no other human action.
------------------------------
Jeff Peterson
------------------------------
MarkShnier__You
Qrew Legend
4 years agoOK, that helps.
You can make a table of Site-Reps (representing all the unique combination of Reps who have every done a Site Visit), where the key field is a concatenation of the Site and the Rep. Populated this running a summary report of all the sites visits summarized by Site-Rep and then "More ... copy these to another table"" ( you would update this manually from time to time, say monthly).
So now we have can have the relationship were One Site has many Site-Reps. You can then have a summary of the Maximum of the visit count and then use that to get at the rep who had the most visits. Then repeat but exclude that winning rep to get the 2nd highest rep. Then repeat to get rep #3.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
You can make a table of Site-Reps (representing all the unique combination of Reps who have every done a Site Visit), where the key field is a concatenation of the Site and the Rep. Populated this running a summary report of all the sites visits summarized by Site-Rep and then "More ... copy these to another table"" ( you would update this manually from time to time, say monthly).
So now we have can have the relationship were One Site has many Site-Reps. You can then have a summary of the Maximum of the visit count and then use that to get at the rep who had the most visits. Then repeat but exclude that winning rep to get the 2nd highest rep. Then repeat to get rep #3.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------