LinkedIn
Copied!

Table of Contents

Creating a custom message category

You can extend the standard categories for messages. By defining custom categories, you can create and classify messages in a way that is specific to your business.

  1. Create a field value for your custom category.

    1. Click Create Data Model Field Value to open the Create form.

    2. In the Label field, enter [custom category name].

    3. In the Field Name field, enter pyCategory.

    4. In the Apply to field, enter Rule-Message.

    5. Click Create and open.

  2. Create a field value for the caption of your custom category.

    1. Click Create Data Model Field Value to open the Create form.

    2. In the Label field, enter [custom category name].

    3. In the Field Name field, enter pyCaption.

    4. In the Apply to field, enter Rule-Message.

    5. Click Create and open.

  3. To prompt users for more input when they select your custom category, create a custom section.
    1. Find and open the standard Rule-Message.pyCustomDetails section by searching for it or by using the Application Explorer.

    2. Click Save as > Specialize by circumstance to open the Specialization form.

    3. Click Property and Date.

    4. In the Property field, enter pyCategory.

    5. In the Value field, enter the name of your custom category.

    6. Click Create and open to open the Section form.

    7. Update the section with references to properties in the Rule-Message class, so that it collects information that is relevant to your custom category.

      For example, you can add a text box to a layout in the section and then associate it with a property that stores text.

    8. Click Save.

  4. To validate the values that users provide at run time, create validation logic that is specific to your custom category.
    1. Find and open the standard Rule-Message.pyValidateFields edit validate rule by searching for it or by using the Application Explorer.

    2. Click Save as > Specialize by circumstance to open the Specialization form.

    3. Click Property and Date.

    4. In the Property field, enter pyCategory.

    5. In the Value field, enter the name of your custom category.

    6. Click Create and open to open the Edit Validate form.

    7. Add criteria to the rule that evaluates the properties that your custom section references.

    8. Click Save.

You can test your changes by creating a message and verifying that your custom category is one of the available options.

Related Content

Article

Messages

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.