Magpi allows for two types of logic: simple and complex.  Simple logic is the kind you can create with just a click or two.  For example, checking the Required checkbox on the design page creates logic that says "if user tries to move past this question without answering, show an error message".  Another example is the "jump to" logic for multiple choice questions that allows you to specify logical branching just by selecting from a menu. 


Simple Logic

  • checking the Required attribute
  • entering range limits for numeric questions
  • using the jump-to pulldown menus for multiple choice questions


The second kind of logic is called "complex logic", and is accessed by clicking the logic button in a question on the design page.  Complex logic is, well, complex and is probably one of the only things in Magpi that requires some expertise.

 

Complex Logic 

  • Each complex logic statement has a destination question to which it points the logic to
  • Complex logic automatically adjusts the logic if you move a question.  So if you have logic pointing to the current question 10, and it is later moved to position 15, the logic will still work
  • When a question is deleted that had some logic attached to it, the logic is also deleted
  • Changing a question from a multiple-choice to non-multiple-choice clears the logic for that question
  • Moving a question may delete the logic (you will be notified if this is the case)


There are two basic ways of using complex skip logic to create a logical skip pattern:


1 - Jump to based on "has option selected" (multiple choice questions)


This complex is mainly used on multiple choice question types, however it has mostly been replaced by the "simple logic" using the jump-to menu in the question options table (which accomplishes the same thing in an easier way).  Here we see first the complex logic approach and then the jump-to menu (you can right-click an image to open it larger in a new browser window):


complex logic

 


jump-to logic ("simple logic")


1 - Jump to based on value  (numeric or text questions)



text_value.png



Pointers for Creating Complex Logic


  1. It's better to have all your questions in place before adding any logic
  2. Make sure you've saved your form before adding logic
  3. You cannot add more that 6 complex logic conditions to one question



 




Log into Magpi now!


Not a Magpi user? Click here to register for free.