Allocation questions in scripting
Use scripting to get and set values for Allocation questions.
On the back end, the Allocation question is a collection of open end numeric values.
Function or property | Description |
---|---|
question.getItems()
|
Gets the Allocation item objects. For each item object, you will be able to get or set a value. |
item.index;
|
A zero-based, read-only property that reflects the authored index of the item. The first authored item is 0, the next is 1, the one after that is 2, and so on. |
item.set(number)
|
Sets a numeric Allocation value for the item. |
item.get()
|
Gets the numeric Allocation value for the item. The default value is 0. |
question.unset();
|
Unsets the value so that there is a default no value state for the question. |