Logic items

Understanding exported data - Logic items

If your templates use logic fields, you may want to analyze questions under logic, or ignore questions that are not visible due to logic.

To understand the data involving logic fields, it's important to understand the structure and concepts of logic fields to see how they work.

There are 3 key items:

  • Parent question: The question which the logic field is evaluating.
  • smartfield / Logic field: The item that contains the relevant logic.
  • Child question(s): The question(s) which are shown when the logic field evaluates true.

When child questions are hidden due to the logic not being evaluated to true, the child questions will have inactive set to true. Inactive indicates that the question is not visible in the inspection or inspection report.

Consider the following example of logic fields.

Example of logic fields

This data appears as follows when exported:

aaaazzzzquestionQuestion with logicNo
bbbbaaaasmartfieldtrueif response is |No|true
ccccbbbbquestionfalseQuestion that appears when no
ddddaaaasmartfieldtrueif response is |Yes|false
eeeeddddquestiontrueQuestion that appears when yes

As a tree, the structure looks like this:

question - Question with logic (id: aaaa, inactive: false)
├── smartfield - if response is |No| (id: bbbb, inactive: true)
│   └── Question that appears when no (id: cccc, inactive: false)
└── smartfield - if response is |Yes| (id: dddd, inactive: true)
    └── Question that appears when yes (id: eeee, inactive: true)