Dynamic Enumerations
The enumerations created in the previous section maintains static list values. In other words, the values can't vary per deployment/instance. You can allow for a variation of values per instance by editing the .enums file with a text editor and setting the dynamic flag on the desired enumeration.
For example, edit the ZBKS.enums file in a text editor and add the "dynamic" attribute to the xml element for the enumeration ZBKS.Genre:
<Enumeration type="ZBKS.Genre" dynamic="true"> <EnumEntry name="Fiction">0</EnumEntry> <EnumEntry name="Non-Fiction">1</EnumEntry> <EnumEntry name="Historical">2</EnumEntry></Enumeration>A ValueChain administrator can now add new values or hide existing values using the inbound interface PLT.DynamicEnumerations_IB(1.0). Alternately, the following webaction can be plugged into RoleTypeUiConfig for VALUE_CHAIN_ADMIN.
<WebActionRef name="PLT.Enum.DynamicEnumerations" module="PLT"/>
The above flag only allows variation at ValueChain level. For allowing enterprise administrator to add their enterprise-specific variation (adding new values, hiding static values), enable allowEntEnums flag for the enumeration.
<Enumeration type="ZBKS.Genre" dynamic="true" allowEntEnums="true"> <EnumEntry name="Fiction">0</EnumEntry> <EnumEntry name="Non-Fiction">1</EnumEntry> <EnumEntry name="Historical">2</EnumEntry></Enumeration>