I want to build a workflow that will assign the metadata value of a processor's name to a file. However, I want this to select the name randomly (or in an order) and not chose a default person. Any ideas?
Is this doable in Workflow and/or Forms?
I want to build a workflow that will assign the metadata value of a processor's name to a file. However, I want this to select the name randomly (or in an order) and not chose a default person. Any ideas?
Is this doable in Workflow and/or Forms?
It sounds like you are trying to do a Round Robin assignment. The User Task activity in Forms has that already built-in when assigning to a team there is a box to check to enable round robin assignments.
In Workflow, you would need to kind of create your own. Using a custom database, you could create and maintain a list of "last processor assigned" or something like that.
If you want it to just randomly select one without concern of prior assignments (assuming it evens out statistically over time) then you could just randomly sort your list of processors. If they are in a SQL database you can query from Workflow, getting the query results sorted randomly should be pretty straightforward. I have six or seven workflows that do that via a Custom Query activity. Just add the following to the end of your query to sort the results randomly: ORDER BY NEWID()
The NEWID() function in SQL generates a UUID number (long alphanumeric value) at random for each record, so sorting by that very easily sorts the list randomly. Then set the activity to "First row only" and you'll get one random record from your query each time.