Control-Questions

In IEG, a question may be specified as being a control question. Control questions are defined by setting the control-question attribute to true and specifying a control-question-type. Control questions can be used to control the flow of the script or to control the display of clusters on a page. The answers supplied to control questions are not persisted in the Datastore, hence having to specify a type in the script definition.

Control questions may be referred to in:

The scope of control questions is global within a script execution. Defining multiple control questions with the same ID will result in unexpected behavior and should be avoided. For example, two separate while loops should not be controlled by the same "hasMore" control question.

When control questions are referenced by for loops, once an answer is supplied and the loop execution begins the answer to the control question may not be changed. When control questions are referenced by while loops, once an answer is supplied and the loop execution begins the answer to the control question may not be changed except for the last record in the loop.