Weird Behavior with Microsoft PCF Option Set Custom Control

Weird Behavior with Microsoft PCF Option Set Custom Control

As part of the controls that are available for Model Driven apps in unified interface we have the Option Set PCF custom control. Recently I encountered a weird behavior in these controls. I am not sure whether Microsoft would consider this as a bug or a feature, but I wanted to discuss this here, so that possibly it can help other who are encountering the same issue.

The Option Set custom control allows you to change the default behavior of a 2 values Option Set or 3 values Option set into a 2 or 3 tiles displayed side by side.
For the purpose of demonstrating this issue, I created four local option set controls. Two options sets will contain 2 values and two option sets will contain 3 values. The table below shows you the settings of these option sets that I created:

Name Preferred Payment Method Payment Confirmation Email Delivery Status Payment Status
# of Option Sets 2 2 3 3
Required Not Required Not Required Not Required Not Required
Default Value Unconfirmed Created

When I open the form, I will see the image below. Two of the option sets have no selected value, and two of them have a selected value.

Option Sets PCF Custom Control (Displayed on Create of new record)
I can go ahead, and select the different options in all of the controls, but if you notice the difference in behavior, the custom controls that had a default value, must have a value. I am unable to select that default value and leave it as null.

Option Set Custom Control issue

I would consider this to be a bug. If the setting of the control was required, I can understand that one of the values must be there in order to save, and I cannot change this from having at least one selected value, however, having a default value should allow me to remove that value and not select any other value.
I will report this to Microsoft and update this in case I hear any response.