Multi-Select Quota

Zachary Anderson
Last updated: 06 Apr 2022
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

  • By default, this will add three quota questions to the questionnaire.  These questions should be copy-and-pasted or removed as needed so that one quota question exists for each quota cell that a respondent might qualify for.  For example, if respondents may qualify for one to four cells, then four quota questions should exist.
    • You may change the question names, but their names must continue the pattern of [BASE NAME]+[INCREMENTING NUMBER].  For example, you may name them "Quota1", "Quota2", "Quota3", etc.
    • A page break should exist between each of these quota questions.
    • Each quota should be set to check for cell membership sequentially.  If you require non-sequential checking, this will be addressed later.
  • Helper variables must be added to the survey through the Questionnaire Access area, one for each quota question.  Each should be set to "Link Variable (Whole Number)".
    • Like before, the variable names must follow the pattern of  [BASE NAME]+[INCREMENTING NUMBER].  For example, you may name them "QuotaHelper1", "QuotaHelper2", "QuotaHelper3", etc.
    • If using an earlier version than Lighthouse Studio v14, you should be adding pass-in fields.  They should still be set to whole numbers.
  • Edit the first quota cell of the first quota question by clicking the pencil icon near its qualification logic:
    • Line 5 should reflect the base name of the quota questions.
    • Line 6 should reflect the base name of the variables.
    • Line 9 should reflect the number of quota questions.
    • Line 12 should reflect the number of choices to make for this respondent.  This will likely be the number of quota questions, but can be set dynamically so different respondents qualify for differing numbers of quota cells.  For example, my $numberOfChoices = GETVALUE('Q1'); would result in respondents being assigned to as many cells as the response provided for question Q1.
    • Line 19 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 (by percentage), 3 to check cells from least filled to most filled (by count), or 4 to check cells randomly.
    • Lines 25-44 must be updated to define the limit and qualification logic for each cell.  Qualification logic return 1; would result in a cell that all respondents can qualify for; inversely, return 0; would result in a cell that no respondents can qualify for.  For example, if you have a checkbox-type select question Q1, these settings would result in respondents qualifying for each cell depending on if they checked the corresponding item in the question:
      my %quotaCells = (
          1 => {
              limit => 50; # allow 50 respondents in the first cell
              qualify => sub { return GETVALUE('Q1_1'); }
          },
          2 => {
              limit => 100; # allow 100 respondents in the second cell
              qualify => sub { return GETVALUE('Q1_2'); }
          },
          3 => {
              limit => 99999; # effectively allow any number of respondents in the third cell
              qualify => sub { return GETVALUE('Q1_3'); }
          }
      );
    • Line 51 can be used to define prohibitions between quota cells.
      For example, this would limit respondents to being placed into only one of the first three quota cells:
      my @prohibitions = (
          [1, 2],
          [1, 3],
          [2, 3]
      );

      As another example, this would allow respondents to being placed into any two of the first three quota cells but not all three:
      my @prohibitions = (
          [1, 2, 3]
      );
  • Edit all quota questions and cells:
    • Ensure all quota questions have one cell for each possible choice, just like when using them normally.
    • For all cells besides the first one of the first quota question, the qualification logic should be set to [variable base name][current quota question number] = [current quota cell number].  For example, if the variable base name was "QuotaHelper", then the qualification logic of the third cell of the second quota question should be set to QuotaHelper2 = 3.
    • All quota cells should have a cell limit above the expected respondent count (e.g., 99999).  Do not apply any real limit counts here.
  • Note that all quota questions must have a question assigned as the "do not qualify skip."  Respondents will follow these skips if they do not qualify for all quotas, so set these skips as needed.  In most cases, you probably want to set these to whatever question comes after the quotas.
    • For example, if you have five quota questions but a respondent only qualifies for three, they will have normal responses to the first three quota questions, but then will skip to whatever question was set for the fourth quota question.  Following this same logic, a respondent that does not qualify for any cells will skip to whatever question was set for the first quota question.