Enabling conditions of the questionnaire

How can I download a list of all the enabling conditions included in the questionnaire? This could be useful for later analysis tasks.

In versions prior to 20.09, this was part of the questionnaire documentation in .json format, and it was possible to extract them from there.

Hi,

you can still retrieve this .json format document. You need to include it in your export request.

See Changes to data export organization in latest release 20.09.

More info on meta-data can be found here.

Hi Peter, thanks for your reply,

I was able to download the document.json file, however I think my question goes the other way.

Before, I would run this query on the document.json file, using Node.js and obtain a list with all the enabling conditions of the questionnaire:

const fs = require(‘fs’);
let document = fs.readFileSync(‘document.json’);
let jsondocument = JSON.parse(document);
var jp = require(‘jsonpath’);
jp.query(jsondocument, ‘$…Children[?(@.ConditionExpression)]’);

Apparently due to a change in the structure of the document.json file, I run this query and can’t get the enabling conditions anymore. I don’t know if document.json still contains this information or if it is now stored outside of it? I would like to know where I can get it again?

While I don’t know much JS, I do see that the key is still there in document.json. See the highlighted line below for a list question.

I am working on a server with version 20.08.1 (build 29049). I have searched document.json and have not found the attribute “ConditionExpression” at all. Instead of this I have found the attributes “EnablementTableName” and “DoesSupportEnablementTable: true” at the end of each section and some lists, which I highlight in the following image:

Hmm. This might be one for the dev team… @andrii, @alfeg, @vitalii ?

Prior version 20.09 conditions were not fully available in JSON file exported from the system.
If you want to have access to all conditions from questionnaire you should update you version to the latest one 20.10.1 and import questionnaire from Designer. All questionnaire structure including conditions will be exported in JSON file.

1 Like