-
-
Save Hugoberry/a25bf43fbc2ada9a1cc29f874f509134 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let func = | |
(SelectionList as list, ListOfPositions as list, optional StartWithOne as number) => | |
let | |
selectionList = List.Buffer(SelectionList), | |
listOfPositions = List.Buffer(ListOfPositions), | |
StartPosition = if StartWithOne = 1 then -1 else 0, | |
Result = List.Transform(ListOfPositions, each SelectionList{_ + StartPosition}?) | |
in | |
Result | |
, documentation = [ | |
Documentation.Name = " List.SelectPositions | |
", Documentation.Description = " Selects all items from <code>SelectionList</code> that are on positions in <code>ListOfPositions</code>. | |
" , Documentation.LongDescription = " Selects all items from <code>SelectionList</code> that are on positions in <code>ListOfPositions</code>. For the behaviour of the optional parameters see: https://wp.me/p6lgsG-N8 . | |
", Documentation.Category = " List Selection | |
", Documentation.Source = " https://wp.me/p6lgsG-N8 . | |
", Documentation.Author = " Imke Feldmann: www.TheBIccountant.com . | |
", Documentation.Examples = {[Description = " For details see: https://wp.me/p6lgsG-N8 . | |
" , Code = " List.SelectPositions({1..5}, {0, 3, 4}) | |
", Result = " {1,4,5} | |
"]}] | |
in | |
Value.ReplaceType(func, Value.ReplaceMetadata(Value.Type(func), documentation)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment