Attributes

Table 1. Question Attributes
Name Description
id

the id of a question refers to the name of the attribute used to store the answer to the question within the Datastore. The entity to which this attribute belongs is taken from the cluster which contains this question (if one has been specified) or the page containing the cluster.

For example, if the question is contained within a cluster on a page which has the entity Address specified for the cluster and Person specified for the page, and the id of the question is 'firstName', then the answer to this question will be stored in Address.firstName. If the cluster had no entity specified, the answer to the question will be stored in Person.firstName.

When a page is loaded, if an answer exists in the Datastore for the entity/attribute specified, that value will be displayed as the initial contents of the input field for the question, otherwise the field will be empty, or the configurable text 'please select' will appear for combo boxes.

mandatory specifies whether or not an answer to this question is required or not.If set to true, then an asterisk is placed beside the question to indicate that it is mandatory and validations are performed by the Engine when the user clicks the Next button to ensure that an answer has been provided for this question.
control-question this attribute can be used to indicate that the answer to this question is used purely to control the flow of the script and is therefore not to be found in the Datastore. Instead, the IEG Engine will maintain its own copy of this value. The id of a control question must be unique within the script.
control-question-type if the control-question attribute is set to true, then you must also set this attribute so that the IEG Player knows what type of input control to use and the Engine knows how to handle it when used in expressions. The value used for this attribute must be a valid domain definition.
multi-select this attribute can be used to indicate if the question represents a multi select list question or not. If the specified question data type is a CODETABLE_CODE, then this question is displayed to a user as a drop-down list containing the possible answers (i.e. the descriptions of the codetable entries). Setting this attribute to true (the default is false) ensures that a user may select none/one/all of the possible answers for the specified question. It is the codetable code corresponding to the description of the answer(s) selected that is stored in the Datastore in this instance.
default-value-expression this attribute can be used to specify an expression that will be evaluated at runtime to determine an initial answer value that will be presented to the user. The user can then choose to accept the initial value or overwrite it with some other value. The default value expression for a question is only evaluated once per script execution and is evaluated just before the page on which the question is declared is displayed. Default value expressions can be complex expressions and can reference answers already supplied during script execution. The constraints on other expressions hold true for default value expressions and any attributes referred to in the expressions should have a real value by the time the expression is evaluated. Default value expressions can also be defined for control questions.
read-only-expression a boolean expression which, if evaluated to true at runtime, causes the question to become read-only.
show-field-help a boolean attribute which, if true, results in a help icon being displayed alongside the question input field. In the case of list questions and codetable-type questions without dropdown inputs, the help icon is displayed alongside the question label. Clicking the help icon opens a modal dialog that displays the help text for the question.