Sets the item at the specified index.
<list>
none
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. |
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.
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>