Skip to main content

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​

NameTypeDescription
listlistThe list to update.
indexnumberThe position to replace. 0 is the first item, 1 is the second, and so on.
itemanyThe replacement value. The accepted type is inferred from the list's inner type.

Outputs​

NameTypeDescription
resultlistA new list with the item at the given index replaced. The output list type matches the input list type.

Configuration​

  • From: Start or End — which end the index counts from. With End, index 0 replaces 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.