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


Creates the cross product from two lists.

Component Version macOS Windows Linux Server iOS SDK
List 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "List.CrossProduct"; List1; List2 { ; Prefix; Midfix; Postfix; Flags } )   More


Parameter Description Example Flags
List1 The first list to process. "Hello¶World"
List2 The second list to process. "1¶2"
Prefix The prefix to use Optional
Midfix The middle to use.
This text is put between texts from both lists.
Postfix The postfix to use Optional
Flags Pass 1 to have no extra newline character on the end of the returned list. Default is 0 to include one to easily concat lists.
Add 2 for a diagonal cross, so we combine each element of first list with the same element index from the second list.
1 Optional


Returns list or error.


Creates the cross product from two lists.
Optionally adds prefix, postfix and midfix.
Returns empty list if one of the lists are empty!


Test with all parameters:

MBS( "List.CrossProduct"; "Hello¶World"; "1¶2"; "before"; "middle"; "after" )

Combine elements from lists:

MBS( "List.CrossProduct"; "Hello¶World"; "1¶2"; "before"; "middle"; "after"; 2 )

Take two lists to fill two columns in a list dialog:

MBS("ListDialog.AddItemsToList"; MBS( "List.CrossProduct"; ListDialog::Text1; ListDialog::Text2; ""; Char(9); ""; 2))

See also

Blog Entries

This function checks for a license.

Created 4th March 2016, last changed 10th December 2020

List.CountValuesMatching - List.DeCombine