Multi-Select Quota

Zachary Anderson
Last updated: 12 Apr 2021
Written for: Lighthouse Studio 9.3

Description

A series of quota questions used to effectively allow respondents to qualify for multiple cells of a quota question.

Instructions

  • The quota questions should be copy-and-pasted such that you have one question for each cell that any given respondent might qualify for.  They should all have page breaks between them.  They should share a base name with an iterating number at the end (e.g., "Quota1," "Quota2," "Quota3," ...).
  • Pass-in fields must be added to the survey, one for each quota question.  They should all be set to whole numbers.  They should also share a base name with an iterating number at the end (e.g., "QuotaHelper1," "QuotaHelper2," "QuotaHelper3," ...).
  • Edit the first quota cell of the first quota question:
    • Line 5 should be updated with the base name of the quota questions.
    • Line 6 should be updated with the base name of the pass-in fields.
    • Line 8 should be updated with the number of quota questions.
    • Line 9 should be updated with the number of cells per quota question that is going to be used, which is the number of options that can be chosen for a respondent.
    • Line 10 should be updated with the number of choices to make for this respondent.  This will likely be the same as the value on line 8, but can be set dynamically so different respondents qualify for differing numbers of quota cells.
    • Line 12 may be updated with the order with which the cells should be checked for qualification.  1 to check cells in order from top to bottom, 2 to check cells from least filled to most filled, or 3 to check cells randomly.
    • Lines 14-16 may be updated to define cell qualification logic.  By default, all cells are qualified. Example:
      my %qualifications = (
          1 => sub {
              return 1; # always qualify for the first cell (same as default behavior)
          },
          2 => sub {
              return 0; # never qualify for the second cell
          },
          3 => sub {
              return GETVALUE('Q1') > 50; # only qualify for the third cell if the response to Q1 is greater than 50
          }
      );
  • Edit all quota questions and cells:
    • All quota questions must have one cell for each possible choice, just like when using them normally.
    • All quota cells should have a cell limit above the expected respondent count (e.g., 999999).  For all cells besides the first one of the first quota question, the qualification logic should be set to [pass-in field base name][current quota question number] = [current quota cell number].