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 haveinactive
set totrue
. Inactive indicates that the question is not visible in the inspection or inspection report.
Consider the following example of logic fields.
This data appears as follows when exported:
item_id | parent_id | type | inactive | label | response |
---|---|---|---|---|---|
aaaa | zzzz | question | Question with logic | No | |
bbbb | aaaa | smartfield | true | if response is |No| | true |
cccc | bbbb | question | false | Question that appears when no | |
dddd | aaaa | smartfield | true | if response is |Yes| | false |
eeee | dddd | question | true | Question 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)
Updated over 1 year ago