File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Examples-Blog/Custom Functions Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 22 /*
33 About: Compare different optional parameter types
44 This is from the post: https://ninmonkeys.com/blog/2024/06/05/power-query-functions-part1-using-optional-parameters
5+ source:
56
67 lets call Text.Combine() to test declaring optional parameters
78
1213 - always requires you pass 2 parameters
1314 */
1415 Join_Nullable = (texts as list, separator as nullable text) =>
15- Text.Combine( texts, separator ),
16+ Text.Combine( texts, separator ),
1617
1718 /*
1819 For this version:
1920 - you can pass a null value for a separator
2021 - you can skip the second parameter
2122 - 'optional' parameters are automatically 'nullable',
22- so you can drop the 'nullable' part
23+ so you can drop the 'nullable' part
2324
2425 This is how library functions have multiple call signatures
2526 Power Query defines one function
2930 */
3031 Join_Optional = (texts as list, optional separator as text) =>
3132 Text.Combine( texts, separator ),
32-
33+
3334 Summary = [
3435 chars = { "a".."h" }, // example array of strings
3536
You can’t perform that action at this time.
0 commit comments