format as text is a list operator, so it can be used on any list.

Presumably, your custom state is a list (of the selected options), so ‘format as text’ can be used directly on the custom state.