Customizing the format of case IDs

You can customize the default format of case IDs in your application. By providing a meaningful prefix and suffix, you can help users quickly distinguish instances of one case type from instances of another case type.

Use one of the following techniques to customize the format of case IDs:

  1. Manually set the prefix for each case type in your application definition.

    This approach supersedes any values that you set in an overridden rule, such as a data transform or activity.

    1. In the header of Designer Studio, click [Your application name] > Definition to open the Application form.

    2. Click the Cases & data tab.

    3. In the Work ID prefix field, enter your custom prefix that ends with a hyphen.

    4. Click Save.

  2. Use a data transform to set the prefix for a case type.

    1. In the Application Explorer, navigate to the class that defines your case type.

    2. Expand the Data Model section.

    3. Expand the Data Transform section.

    4. Click pyDefault to open the data transform that runs each time that a case, or instance of your case type, is created.

    5. Add an action to the data transform that sets the value of Data-UniqueID.pyPrefix to your custom prefix.

    6. Click Save.

  3. Use an activity to set the prefix and suffix for a case type.

    1. Open the Work-Cover-.GenerateID activity by using the Application Explorer or searching for the rule by name.

    2. Create a copy of the activity in a ruleset to which you have access and the class that defines your case type.

    3. Update the activity to pass literal string values instead of the current parameter page for the following parameters:

      • IDPrefix

      • IDSuffix

    4. Click Save.

You can test your changes by creating a case or inspecting the value of the Work-.pyID property on the clipboard.