[Power Query] Decorate a function parameter with allowed values {1..9}
✓ Published0🌍 Public
HHugoberry
Last edited Oct 14, 2017
Created on Oct 14, 2017
This example demonstrates a custom Power Query function parameter decorator that restricts input values to the range 1 through 9. It shows how a function like `fnCopy` can be wrapped with `setParameters(fn, {1..9})` to enforce allowed numeric values, improving type safety and self-documentation. The code relies on Power Query’s native function-handling APIs, specifically `setParameters`, which validates and assigns metadata to the parameter. The visualization likely displays the decorated function’s behavior in a query editor, with the allowed range visible as part of the parameter definition. No external rendering libraries are used; the example focuses on the query logic itself, not on graphical output.
AI-generated description