I have a form that has a approval step in which they want on a percentage of forms sent to this step for quality assurance. Is there a way to direct only a certain percentage of forms to this step?
Question
Question
Answer
You would likely need to include a Workflow in order to generate a random number to use for determining which ones to route.
Let's say you want 10% of them to go to this step.
Using Workflow, generate a random number between 1 and 100 and store it into a field in Forms (hide the field on all forms using CSS or Field Rules).
Then in Forms, use a Gateway to select the "review" path if the random number field is less than or equal to 10.
Also, please consider editing your post and changing it from a Discussion to a Question so that once you have your preferred response, you can mark is as answered.
Thank you. How do you get WF to generate the number?
I do it via an SDK Script activity.
Set the activity to use C#.NET.
Add this script into the Execute() function:
//generate a random number between 1 and 100 and return it to workflow as a token Random rand = new Random(); int number = rand.Next(1, 101); SetToken("RandomNumber", number);
The activity will return a token named RandomNumber that will contain the randomly generated number between 1 and 100.