APS package: Enum field has empty entry in dropdown

197 Views Asked by At

In an APS package, I have defined an "account" service to create service users in my application. One of the account's settings is an enum value for the user's role:

<setting type="enum" id="user_role" default-value="2" element-type="enum">
    <name>User Role</name>
    <choice id="1"><name>Administrator</name></choice>
    <choice id="2"><name>Supporter</name></choice>
</setting>

This gets shown as a dropdown value in POA, like this:

Screenshot, showing empty entry in dropdown

So - is there a way to get rid of that empty entry? I think it shouldn't be there, as the setting itself is not labeled as optional. Any ideas?

1

There are 1 best solutions below

1
On

Yes You can use default value in the <settings> section

like below

<setting type="enum" id="user_role" default-value="Administrator" element-type="enum">

Thanks Vasanthan