Just to clarify what I'm looking for: I want to create a custom function with an optional parameter, very much like Table.Sort where Order.Ascending and Order.Descending are optional, and the default is Order.Ascending.
Further, I want this optional parameter to be restricted in such a way that an invalid entry cannot be made without an error, so the user will know immediately if the optional parameter they entered was valid.
So similar to how Table.Sort(Source, {{"Column1", Order.ABCDE}) will result in an error because Order.ABCDE isn't a valid entry. I want my optional parameter to be something like DisplayMode.KeyAndText or DisplayMode.TextAndKey and those should be the only two available options, with the default being DisplayMode.KeyAndText.
Thanks