Data Model > Available DSCs > Surveycraft DSC > Surveycraft *attrib directives
 
Surveycraft *attrib directives
The Surveycraft DSC recognizes the following Surveycraft*attrib directives:
*attrib ID=<QnName>
Sets the name of the column for the current question.
*attrib dsc.useLabel=1
Causes the DSC to render the labels for the codes in the current question to be generated from the code labels of the question instead of using 'Code_1', 'Code_2', and so on. The DSC uses a simple algorithm to convert the labels to something that DDL allows: it removes illegal characters (anything except a-z and 0-9) and replaces them with an underscore (_). If the label starts with a number, the DSC prepends a further underscore character.
The DDL does not allow the same label to be used twice within one question's code frame. The DSC does no checking of this; it is therefore the user's responsibility, when using the dsc.useLabel directive, to ensure that all codes would result in unique names. See Using the dsc.useLabel directive for an explanation of why dsc.useLabel=1 should be used on any questions where you need to compare categories with other questions.
*attrib dsc.grid=1
Causes the MDSC to modify its behavior and render the loop question as a grid, instead of as an mLevel Array. Since the directive does not affect the CDSC, data cannot be exported with this directive in place (the CDSC and the MDSC disagree), but products such as UNICOM Intelligence Interviewer - Paper can be driven by the MDSC to generate a suitable document.
*attrib dsc.hide=1
Causes the MDSC and the CDSC to not render the question. This is useful for removing temporary questions, Autoresponse questions, and so on.
*attrib dsc.hide=0
Causes the MDSC and the CDSC to render questions that would normally not have been rendered (for example, ET questions).
Alternative values for 0 and 1
The notes above show settings of 1 or 0 for dsc.hide, dsc.grid, and dsc.useLabel. The following values may be used in place of 1:
on
yes
enabled
true
Any other value will be treated as 0, so the following are all equivalent:
*attrib dsc.useLabel=true
*attrib dsc.useLabel=yes
*attrib dsc.useLabel=on
See also
About the Surveycraft script
Using the dsc.useLabel directive
Settings used by the Surveycraft DSC
Surveycraft DSC: Troubleshooting
Surveycraft DSC: Supported CDSC features
Surveycraft DSC