up Inquisit Language Reference

setItem function

Sets the item at the specified index.

Member of

<list>

Syntax

list.name.setItem(value, index)

Return Type

none

Parameters

Name Type Description
value value The new value for the item.
index integer The index of the item to set. The first item in the list is 1.

Remarks

The setItem function clears the previous value at a specified index and sets it to a new value. When called on a list element, for example, the function sets a selection pool item.

Examples

The following sets the last item of the selection pool of a list:

<trial myTrial>
/ onTrialEnd= [list.mylist.setItem(values.newvalue, list.mylist.itemCount);]
</trial>

Copyright Millisecond Software, LLC. All rights reserved.