Splitter.SplitByNothing
SplitterReturns a splitter function that does not split its input — it returns each value as a single-element list.
Syntax
Splitter.SplitByNothing() as functionReturn Value
function — A function that wraps each input value in a single-element list without splitting it.
Remarks
Splitter.SplitByNothing returns a splitter function that wraps each input value in a single-element list without any splitting. It is the identity splitter: Splitter.SplitByNothing()("Hello") returns {"Hello"}. The function takes no parameters — just call it with empty parentheses to get the splitter, then call the returned function on a value.
This function's primary purpose is to serve as a no-op placeholder in contexts where a splitter function is required by the API but you do not want any splitting to occur. The most common example is Table.SplitColumn: if you call it with Splitter.SplitByNothing(), each column value is preserved as-is and placed into a single output column, effectively renaming or reformatting the column without splitting its contents.
This can also be useful when building generic transformation pipelines where the splitter is a parameter. By substituting Splitter.SplitByNothing(), you can disable splitting behavior without restructuring the pipeline logic.
Examples
Example 1: Apply the no-op splitter to a text value
Splitter.SplitByNothing()("Widget A")Result | |
|---|---|
| 1 | Widget A |
Example 2: Use in Table.SplitColumn to preserve column values
Table.SplitColumn(
#table({"Product"}, {{"Widget A"}, {"Gadget B"}, {"Widget C"}}),
"Product",
Splitter.SplitByNothing()
)Product.1 | |
|---|---|
| 1 | Widget A |
| 2 | Gadget B |
| 3 | Widget C |
Example 3: Verify the splitter always returns a single-element list
let
splitter = Splitter.SplitByNothing(),
result = splitter("Sales Rep")
in
List.Count(result)The final output — the count of elements in the list, which is always 1 because SplitByNothing never splits.
Result | |
|---|---|
| 1 | 1 |