| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
QuickList.InsertValue
Inserts a value to a list.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| List | 5.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "QuickList.InsertValue"; ListRef; Index; Text ) More
Parameters
| Parameter | Description | Example |
|---|---|---|
| ListRef | The reference to the list returned from QuickList.New function. | $List |
| Index | the index where to insert. | 0 |
| Text | The text to add. | "Hello" |
Result
Returns OK or error.
Description
Inserts a value to a list.Please note that QuickList.AddValue is more efficient than inserting.
Examples
Insert a header line at the top:
# data lines
Set Variable [ $list ; Value: MBS( "QuickList.New"; "John;Berlin¶Jane;Paris" ) ]
# insert the header at index 0
Set Variable [ $r ; Value: MBS( "QuickList.InsertValue"; $list; 0; "Name;City" ) ]
Set Variable [ $csv ; Value: MBS( "QuickList.GetList"; $list ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $list ) ]
Set Variable [ $list ; Value: MBS( "QuickList.New"; "John;Berlin¶Jane;Paris" ) ]
# insert the header at index 0
Set Variable [ $r ; Value: MBS( "QuickList.InsertValue"; $list; 0; "Name;City" ) ]
Set Variable [ $csv ; Value: MBS( "QuickList.GetList"; $list ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $list ) ]
See also
- List.AddValue
- List.InsertValue
- QuickList.AddValue
- QuickList.Deserialize
- QuickList.GetList
- QuickList.GetValue
- QuickList.HasValue
- QuickList.Release
- QuickList.RemoveValue
- QuickList.SetValue
This function checks for a license.
Created 2nd August 2015, last changed 6th November 2026
MarkDown version: QuickListInsertValue.md