I have a survey where we have a list of 48 stores. Based on however many the respondent chooses from the screening multiple choice question we only want to ask follow-ups about a max of 5 of those stores and we want to choose the 5 based on filling the least full quotas first.
Has anyone achieved a least filled quota set up using Lua scripting?
This is what I’m thinking:
- We capture the current response count for each store quota when a respondent comes in to the survey.
- We capture the stores they check off in the screening multiple choice question.
- We match the stores they checked off to the response count captured and order the list in ascending order by response count.
- We choose the first five from the list to show follow-up pages.
Anyone have any feedback on that or suggestions on how to write this script most efficiently?