ADD BRANCHING LOGIC

 

One of the most powerful features of PollMaker is the ability to define branching logic. Branching logic allows you to create polls that alter their behavior based on the input of a respondent. With branching logic, based on one or more previous responses in the course of a poll, you can skip ahead screens, launch another poll, choose to not save the current respondent's data or end the current poll. As a result, you can develop sophisticated polls that adapt to the input of the respondent and ask only the questions that are most pertinent to each individual respondent.


Stucture of Branching Logic

Branching logic consists of a conditional statement that specifies different resulting action based on whether the assertions contained within the statement evaluate to true or false. The general format of branching logic statements is:

IF {  [Assertion #1]  =  True (or False)  }  
  AND/OR  
  {  [Assertion #2]  =  True (or False)  }  
THEN
  < Resulting Action if Conditional Statements evaluate True >
ELSE
  < Resulting Action if Conditional Statements evaluate False >

Among its many potential implementations, branching logic can be used to ask a respondent for further detail about a previous answer. For example, if a respondent selects travel as an answer to a question asking about personal interests, branching logic specifies that this respondent will be shown a poll screen asking for the places to which he has travelled. On the other hand, the same branching logic specifies that respondents who do not select travel as a personal interest will skip this question. Therefore, respondents of this poll are prevented from answering questions that do not pertain to them.


Implementing Branching Logic

Branching logic is implemented through the screen properties within an individual poll screen. Within a poll screen, branching logic can be set to be evaluated either immediately before the poll screen is displayed during the poll or immediately after the respondent leaves the poll screen during the poll.

Poll Designer makes the formulation of branching logic simple by providing a graphical interface called the Branch Logic Dialog (figure 1) for constructing branching logic statements. Each tab on this dialog corresponds to a different portion of the branching logic statement.


Figure 1:  Poll Designer - Branch Logic Dialog

The poll designer uses the IF... tab (figure 1) on the Branch Logic Dialog to create one or more assertions to be evaluated in a branching logic statement. This tab shows a list of the poll screens within the current poll and allows the designer to drill down to the possible answers contained on each poll screen. As a result, the poll designer can select the answer to be included in each assertion and whether the branching logic statement asserts that the answer was selected or not selected by the respondent. Multiple assertions can be combined with the keyword "AND" or "OR" (e.g. answer 1 was selected by respondent OR answer 2 was selected by respondent).

The poll designer uses the THEN... tab (figure 1) on the Branch Logic Dialog to specify the action that will occur if the assertion portion of the branching logic statement evaluates to true and the ELSE... tab (figure 1) to specify the action that will occur if the assertion portion evaluates to false. Both of these tabs offer the poll designer the same choices of actions:

Action Description
SAVE Poll Data and Jump to End-of-Poll Screen The respondent will be taken directly to the last screen in the poll. The response data for the current respondent will be saved.
DUMP Poll Data and Jump to End-of-Poll Screen The respondent will be taken directly to the last screen in the poll. The response data for the current respondent will be discarded.
Jump directly to screen ... The respondent will be taken directly to the screen specified in a list of all poll screens.
SET Variable X to <TRUE> or <FALSE> The poll variable X (see the "Advanced Branching Logic" topic below) will be set to the value (true or false) specified by the poll designer.
LAUNCH Poll X Launches the sub-poll specified in the list of sub-polls (see the "Advanced Branching Logic" topic below).
SKIP this screen and continue The poll screen within which the poll designer has created this branching logic statement will be skipped and the respondent will be shown the next screen in the poll.
DO this screen and continue The poll screen within which the poll designer has created this branching logic statement will be shown as normal.

The Symbol View tab (figure 1) allows the poll designer to view the branching logic statement that has been created using the graphical interface on the other three tabs (see the "Structure of Branching Logic" topic above for the general format of branching logic statements). As the poll designer becomes more comfortable with the syntax of these statements, she can edit these statements directly on this tab if she desires.


Advanced Branching Logic Functionality

Poll Designer provides additional branching logic functionality beyond simply skipping poll screens or ending a poll based on whether a previous answer was or was not chosen by the respondent. Examples of advanced branching logic capabilities include the nesting of branching logic statements, the definition of poll variables and the use of sub-polls.

Nesting Branching Logic Statements
Nested branching logic statements are useful when you have more than two responses for which you wish to take different actions. For example, suppose that in a poll you ask the respondent to choose one of three choices: whether he drinks Coca-Cola, Pepsi or has no preference between the two. You want to ask different questions within the poll based on the respondent's answer. Since branching logic statements only allow you to specify actions if an assertion is true or false (e.g. drinks Coca-Cola or doesn't drink Coca-Cola), you cannot create a simple statement that will handle all three of these options. In order to specify actions for all three cases, you must create a branching logic statement within a branching logic statement. This nested branching logic statement would look something like:

IF { [Soft Drink?:Coca-Cola] = True }
THEN
  <Skip to questions about Coca-Cola>
ELSE
  EVALUATE
    IF { [Soft Drink?:Pepsi] = True }
    THEN
     

<Skip to questions about Pepsi>

    ELSE
      <Skip all questions about soft drinks>
  GO;

The EVALUATE & GO key words delineate the beginning and the end respectively of a nested branching logic statement. Poll Designer allows an infinite number of levels to be nested in this manner.

Poll Variables
Poll variables can be defined for a poll within Poll Designer. These boolean variables always have a default value of false each time the poll begins, but the value of poll variables can be changed in branching logic statements during the course of a poll. Poll variables can be useful if you have the same compound assertion that you test in several branching logic statements within the poll. For example, if you test more than once during your poll whether the respondent is a guest in your hotel and dined at the hotel restaurant and ordered a special dish, you could create a poll variable called GuestAteSpecial. You could set this variable to true or false with a branching logic statement, and then each time you test for this criteria, you could use the poll variable as your assertion instead of recreating the entire list of conditions. As a result, your poll design becomes easier to understand and maintain.


Sub-Polls
A sub-poll is simply another poll that is launched by a branching logic statement in the current poll. In this context, the poll that launches a sub-poll is referred to as the parent poll. When the evaluation of a branching logic statement in the parent poll results in the launch of a sub-poll, the Polling Engine loads the sub-poll into memory and continues with the current polling session. To the respondent, this switch is seamless, and the parent poll and sub-poll appear as a single poll. Poll Designer also allows you to specify within a poll the names of any sub-polls that might be launched from the poll. These sub-polls will be loaded into memory when the original poll is first loaded into memory. As a result, sub-polls will be launched with less delay since they already reside in memory.

As polls grow in size and complexity, the use of sub-polls allows the poll designer to better organize and maintain large polls. A common use of sub-polls is to provide a single poll in multiple languages. In the parent poll, the respondent chooses a language preference, and then branching logic launches the sub-poll that contains poll questions in the desired language.

 

Return to Poll Creation.

 
 

HOME                  OpinioNation Inc. 2001