Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
List.CrossProduct
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
Parameters
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. |
Optional | |
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 |
Result
Returns list or error.
Description
Creates the cross product from two lists.Optionally adds prefix, postfix and midfix.
Returns empty list if one of the lists are empty!
Examples
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
- Comparing Base Elements Plugin to MBS FileMaker Plugin
- MBS FileMaker Plugin, version 6.2pr1
- New functions for MBS FileMaker Plugin coming soon
- MBS FileMaker Plugin, version 6.1pr5
This function checks for a license.
Created 4th March 2016, last changed 10th December 2020