List Set Item
Runs on: Shared — pure logic, runs on the Community backend or inside a chatbox overlay.
The List Set Item node takes a list, an index, and a replacement value, and outputs a new list with the item at that position swapped out. Everything else in the list stays in place. The original list passed in is never modified.
If the index falls outside the list's range, the list is returned unchanged — it never errors on a bad index.
Inputs
| Name | Type | Description |
|---|---|---|
list | list | The list to update. |
index | number | The position to replace. 0 is the first item, 1 is the second, and so on. |
item | any | The replacement value. The accepted type is inferred from the list's inner type. |
Outputs
| Name | Type | Description |
|---|---|---|
result | list | A new list with the item at the given index replaced. The output list type matches the input list type. |
Configuration
- From:
StartorEnd— which end the index counts from. WithEnd, index0replaces the last item.
Example
You keep a list of the last 3 raid shoutouts displayed on an overlay. Instead of removing and re-adding, wire the running list into List Set Item with Index 0 and From set to End to overwrite the most recent slot with the newest raider's name, keeping the list the same length.