Create an Enumeration Property

Option buttons and drop-down lists are examples of the enumeration property. This means, you can have a set of valid values and you can select only one value from the set. For example, you have four types of customers, Standard, Gold, Silver, and Bronze and you want to indicate the customer type on each activity record.

This example creates an enumeration property, Customer level with four values, Standard, Gold, Silver, and Bronze, and displays the property as a drop-down list in the user interface.
  1. Click Properties in the Resources, Activities, Inventories section.
  2. Click Add New.
  3. Select Activity from the Entity drop-down list.
  4. Enter Cust_level in the Property label field.
  5. Enter Customer level in the Property Name field. Enter the name in English and in all the languages that are active in the application.
  6. Select Enumeration from the Property Type drop-down list.
  7. Select Combobox from the GUI drop-down list.
  8. Click Add in the Enumeration values section.
    The Add enumeration value dialog box appears with the Active check box selected. If you clear the Active check box and make a value inactive, the value is available for selection on the page to which you add the property.
  9. Enter Standard in the Enumeration Values field and click Add.
    The values you add here display in alpha-numeric order.

    The application applies an index value automatically to each enumeration value, and it is case sensitive. The APIs reference the index value. You can add the index values manually too. For example, if you want to use a readable value for 'customer not home', you can use the code CNH instead of the default index value, 1 and map the code to the client system. You cannot edit the index value after it is added. Don't use '0' (zero) or '-1' (minus one) for index values, as they are reserved for internal use.

  10. Repeat step 9 and add Gold, Silver, and Bronze.
  11. Click Add on the Add New Property page.
    The "Default Values", "Validation Rules", and "Visibility" fields of Visual Form Editor only work with an enumeration property's index and not its actual value. You cannot use the value in functions such as if, concat, or in various operators. If feasible, you can try setting the same string for both, the value and index for the properties you must use in the "Default Values", "Validation Rules", and "Visibility" fields.