File tree 1 file changed +4
-3
lines changed
Examples-Blog/Custom Functions 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2
2
/*
3
3
About: Compare different optional parameter types
4
4
This is from the post: https://ninmonkeys.com/blog/2024/06/05/power-query-functions-part1-using-optional-parameters
5
+ source:
5
6
6
7
lets call Text.Combine() to test declaring optional parameters
7
8
12
13
- always requires you pass 2 parameters
13
14
*/
14
15
Join_Nullable = (texts as list, separator as nullable text) =>
15
- Text.Combine( texts, separator ),
16
+ Text.Combine( texts, separator ),
16
17
17
18
/*
18
19
For this version:
19
20
- you can pass a null value for a separator
20
21
- you can skip the second parameter
21
22
- 'optional' parameters are automatically 'nullable',
22
- so you can drop the 'nullable' part
23
+ so you can drop the 'nullable' part
23
24
24
25
This is how library functions have multiple call signatures
25
26
Power Query defines one function
29
30
*/
30
31
Join_Optional = (texts as list, optional separator as text) =>
31
32
Text.Combine( texts, separator ),
32
-
33
+
33
34
Summary = [
34
35
chars = { "a".."h" }, // example array of strings
35
36
You can’t perform that action at this time.
0 commit comments