Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

List.SetValue

Sets a value in the list.

Component Version macOS Windows Linux Server iOS SDK
List 7.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "List.SetValue"; List; Index; Text )   More

Parameters

Parameter Description Example
List The list to process. "Hello" ¶ "" ¶ "World"
Index The index of the value to set.
Must be in range from 0 to ValueCount(List).
$index
Text The text to add. "Hello"

Result

Returns list or error.

Description

Sets a value in the list.
If index is equal to count, we append the text to the list.
For big lists, using QuickList functions is much faster. The list is only parsed once and stored in memory.

Examples

Replaces second value with a new text:

MBS( "List.SetValue"; "Hello¶World"; 1; "Third" )

Example result:
Hello
Third

See also

Release notes

This function checks for a license.

Created 11st March 2017, last changed 15th January 2024


List.Serialize - List.Shuffle