List.RemoveItemAtIndex(List0,indices)
List.RemoveItemAtIndex({1,2,3},0)
Monday, 12 December 2016
Wednesday, 7 December 2016
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.
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.
Tuesday, 6 December 2016
List.GroupByKey
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.
Monday, 5 December 2016
List.FilterByBoolMask
List.FilterByBoolMask(List0,mask)
List.FilterByBoolMask({1,2,3,4},{true,false,false,true})
In this way you will have a list with two sublists. Separate sublists will doesn't work with classic code. You need a little trick. Create a list of a given list, then return a flatten list with one less sublist.
ListFBBM = List.Flatten({List0},1);
ListFBBM_in = ListFBBM[0];
ListFBBM_out = ListFBBM[1];
Or use the following method:
ListFBBM_in = __TryGetValueFromNestedDictionaries(ListFBBM, "in");
ListFBBM_out = __TryGetValueFromNestedDictionaries(ListFBBM, "out");
List.FilterByBoolMask({1,2,3,4},{true,false,false,true})
In this way you will have a list with two sublists. Separate sublists will doesn't work with classic code. You need a little trick. Create a list of a given list, then return a flatten list with one less sublist.
ListFBBM = List.Flatten({List0},1);
ListFBBM_in = ListFBBM[0];
ListFBBM_out = ListFBBM[1];
Or use the following method:
ListFBBM_in = __TryGetValueFromNestedDictionaries(ListFBBM, "in");
ListFBBM_out = __TryGetValueFromNestedDictionaries(ListFBBM, "out");
List.Deconstruct
List.Deconstruct(List0)
List.Deconstruct({1,2,3,4})
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 ListD[0] and ListD[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.Deconstruct({1,2,3,4})
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 ListD[0] and ListD[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.
Friday, 2 December 2016
Sequence
start..#amount..step
Write integer numbers or floating numbers or variables in code block to make a sequence. First number is start range, second is the amount of items in the sequence list and third is step. Between numbers insert dot dot.
Write integer numbers or floating numbers or variables in code block to make a sequence. First number is start range, second is the amount of items in the sequence list and third is step. Between numbers insert dot dot.
Sequence default
Sequence by default starts at 0, the total amount of items is 10 and the step is 1. To do the same with Code Block just write 0..#10..1
First number is the start, dot dot, then use hash sign before second number to assign the amount, dot dot, finally the step. In this case the step cannot be tacit.
First number is the start, dot dot, then use hash sign before second number to assign the amount, dot dot, finally the step. In this case the step cannot be tacit.
Range
You can use also variables instead of simple number.
Range default
Range by defaul starts at 0, ends at 9 and the step is 1. To do the same with Code Block just write 0..9
The first number is the start, dot dot, the second is the end. The step 1 is tacit.
The first number is the start, dot dot, the second is the end. The step 1 is tacit.
Thursday, 1 December 2016
List.Create
{List1,List2,List3,List4}
Use curly brackets to create a List and use commas to separate arguments of the list.
Subscribe to:
Posts (Atom)