| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
QuickList.AndColumn
Returns a list with values which are contained in both lists.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| List | 10.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "QuickList.AndColumn"; List1; List2; Separator; Column { ; ReturnNewList } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| List1 | The reference to the first quicklist. | $List1 | |
| List2 | The reference to the second quicklist. | $List2 | |
| Separator | The separator text. Can be multiple characters. For tab separated text, pass Char(9). For CSV separated text, pass ";" or ",". |
Char(9) | |
| Column | The index of the column to compare. Starts with 0 for first column. |
0 | |
| ReturnNewList | Pass 1 to return result as new QuickList. This new list must be freed later using QuickList.Release function. Pass 0 (Default) to modify the list in the List1 parameter. |
0 | Optional |
Result
Returns list, OK or error.
Description
Returns a list with values which are contained in both lists.Performs a logical AND operation.
Checks the given column in both lists too compare.
If Separator is empty, this is same as QuickList.And, but slower.
Examples
Find records in both lists by ID column:
# tab separated lines with ID and name
Set Variable [ $list1 ; Value: MBS( "QuickList.New"; "1" & Char(9) & "Apple¶2" & Char(9) & "Banana¶3" & Char(9) & "Cherry" ) ]
Set Variable [ $list2 ; Value: MBS( "QuickList.New"; "2" & Char(9) & "Banane¶3" & Char(9) & "Kirsche" ) ]
# compare column 0 (ID) and return a new list with lines from list1
Set Variable [ $both ; Value: MBS( "QuickList.AndColumn"; $list1; $list2; Char(9); 0; 1 ) ]
Set Variable [ $text ; Value: MBS( "QuickList.GetList"; $both ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $list1 ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $list2 ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $both ) ]
Set Variable [ $list1 ; Value: MBS( "QuickList.New"; "1" & Char(9) & "Apple¶2" & Char(9) & "Banana¶3" & Char(9) & "Cherry" ) ]
Set Variable [ $list2 ; Value: MBS( "QuickList.New"; "2" & Char(9) & "Banane¶3" & Char(9) & "Kirsche" ) ]
# compare column 0 (ID) and return a new list with lines from list1
Set Variable [ $both ; Value: MBS( "QuickList.AndColumn"; $list1; $list2; Char(9); 0; 1 ) ]
Set Variable [ $text ; Value: MBS( "QuickList.GetList"; $both ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $list1 ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $list2 ) ]
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $both ) ]
See also
- List.And
- List.AndColumn
- QuickList.AddValue
- QuickList.And
- QuickList.GetColumn
- QuickList.GetList
- QuickList.NotColumn
- QuickList.OrColumn
- QuickList.Release
- QuickList.XOrColumn
Release notes
- Version 10.0
- Added QuickList.AndColumn, QuickList.NotColumn, QuickList.OrColumn, and QuickList.XOrColumn functions.
Blog Entries
This function checks for a license.
Created 23th December 2019, last changed 6th November 2026
MarkDown version: QuickListAndColumn.md