Monday, 12 December 2016

Wednesday, 7 December 2016

List.Map

__Map(func,List0)

List.LaceShortest

__LaceShortest(comb,{List1,List2})

List.LaceLongest

__LaceLongest(comb,{List1,List2})

List.Filter

__Filter(List0,condition)

In this way you will have a list with two sublists. If you want two separated lists you need to extract the first sublist using code ListF[0] and ListF[1] for the second. But it will doesn't work. You need a little trick. Create a list of a given list, then return a flatten list with one less sublist: List.Flatten({List0},1).
Now you can split in two lists.

List.Combine

__Combine(comb,{List1,List2})

List.CartesianProduct

__CartesianProduct(comb,{List1,List2})

Tuesday, 6 December 2016

List.LastItem

List.LastItem(List0)
List.LastItem({1,2,3,4})

List.Join

List.Join({List0,List1})

List.IsEmpty

List.IsEmpty(List0)
List.IsEmpty({})

List.GroupByKey

List.GroupByKey(List0,keys)

In this way you will have a list with two sublists. If you want two separated lists you need to extract the first sublist using code ListGBK[0] and ListGBK[1] for the second. But it will doesn't work. You need a little trick. Create a list of a given list, then return a flatten list with one less sublist: List.Flatten({List0},1).
Now you can split in two lists.

List.GetItemAtIndex

List.GetItemAtIndex(List0,index)
List0[index]
List.GetItemAtIndex({1,2,3,4},1)

List.Flatten

List.Flatten(List0,amt)
List.Flatten({1,2,{3,{4}},5},1)

List.FirstItem

List.FirstItem(List0)
List0[0]
List.FirstItem({1,2,3,4})