A constant is a value with a meaningful name that represents text or a numeric value. A constant allows you to easily manage and maintain values that are often used throughout the application. By representing frequently-used values with constants, configuration tasks may be greatly simplified since a change in the value would only require you to modify the constant definition rather then modifying all configuration items (such as workflow rules and actions) that use the value.
The list of constants that are defined in the application can be viewed by clicking the General menu item under the main Administration tab.
The following information is displayed for each constant that is listed:
Constant Name: The unique name that identifies the constant.
Constant Type: The type of value that the constant represents – Text or Numeric.
Edit Icon: Allows you to edit the constant when the icon is clicked.
Delete Icon: Allows you to delete the constant when the icon is clicked.
If you click the template name, then the full details of the constant will be displayed.
To create a new constant, view the list of constants and click the New Constant link. A new window will appear that will allow you to provide the following information:
Constant Name: Enter a unique, descriptive name for the constant. This name will be used to identify the constant in other areas of the application. Constant names can only contain letters, digits, dashes, and underscore characters.
Constant Type: Select either Text or Numeric as the type of the constant. If you select Numeric, then the constant’s value can only contain numbers.
Constant Value: Enter the value of the constant.
After you provide all of the required information, click the Finish button. The new constant will be displayed in the list of constants.
An existing constant can be edited by viewing the list of constants and clicking the Edit icon next to the constant that you wish to edit. A new window will appear that will be populated with the values from the selected constant. Edit the values that you would like to change and click the Finish button.
Note: A constant’s name cannot be changed if the constant is being used in other areas of the application. If you need to change the name of a constant, you will have to modify all items that are using that constant to use a different constant.
An existing constant can be deleted by viewing the list of constants and clicking the Delete icon of the constant that you wish to delete. A dialog box will appear to confirm the deletion. Click the OK button to delete the constant or the Cancel button to return to the list of constants without deleting the constant.
If the constant that you select to delete is used in other areas of the application, then you will not be able to delete it. Instead, you will be shown a message indicating that the constant is being used.
You can view the list of items that are using a constant by clicking the link in the message that informs you that the constant cannot be deleted.
From this list, you can find the items that are using the constant. You will then have to modify all items that reference it, removing their reference to the constant. Once finished, you will be able to go back to the Constant List and delete the constant.