Skip to main content

Decipher Support

All the topics, resources needed for Decipher.


FocusVision Knowledge Base

Scripting Logic

We’ve already scripted a basic survey. Now we need to add some logic to our survey to guide respondents through it along a pre-designated path. In this section, we'll learn about Python, the programming language used to implement logic in Decipher. We'll also encounter some common logic-based tasks within the platform.

Python Overview

Before going any further, we need to have a basic understanding of the Python programming language. Python is the basis for much of the Decipher platform, so even a foundational knowledge of the platform goes a long way to prepare a user for scripting surveys. In this lesson, we’ll be introduced to Python with many expressions and tasks that are common in programming Decipher surveys.

For a complete tutorial, please review the free online course linked in the reference materials below.

thumb_Python Overview.png

Reference Materials:

Logic I

Now that we have foundational knowledge of Python, it’s time to put what we learned into practice. In this lesson, we’ll begin adding logic conditions to our survey. In Decipher surveys, the cond attribute is used to apply skip logic to many survey elements. Conditions can also be applied to an entire list of answer options with rowCond, colCond, and choiceCond.

thumb_Logic I.png

Reference Materials:

Sample Sources

Sample sources determine how respondents get into the survey and where they are directed at survey completion. This lesson will outline the configurations we can use in the <samplesources> tag to meet the needs of the current project, including the name, URL variables, error messages, and exit pages for our sample sources.

thumb_Sample Sources.png

Reference Materials:

Basic Quotas

In this lesson, we’ll cover the basics of the Decipher quota system and build a simple quota.xls file. This file can uploaded to the System Root directory and called through a <quota> tag to limit and monitor our sample, ensuring that our desired specifications are met.

thumb_Basic Quotas.png

Reference Materials:

Logic II

Continuing on from the Logic I lesson from earlier, this lesson will outline some of the more advanced applications of Python logic within Decipher. We’ll also learn about the question object, how to build hidden and virtual questions, make our code more efficient with vector logic, and perform custom data quality checks using the <validate> tag.

thumb_Logic II.png

Reference Materials:


There are several methods for piping content into Decipher surveys. In this lesson, we'll learn how to set up each method, and review that method's benefits and limitations.


Reference Materials:

Advanced Shuffling I

In this lesson, we'll get an introduction to advanced shuffling in Decipher, focusing on controlling and tracking the order of answer elements. We'll also learn how the order attribute for randomized elements can be accessed and re-assigned using a Python list, allowing us to fully control the order of answer options, or match the order across multiple questions.

thumb_Advanced Shuffling I.png

Reference Materials:

  • Was this article helpful?