Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Validating field values for stage entry

Updated on March 29, 2022

Ensure that a case contains relevant data before it enters a specific stage by validating the field values that users provide. By validating field values for a stage entry, you prevent the case from proceeding to the next stage without the relevant information. If the value that the user enters into a form at run time meets the condition in a validate rule, the application displays an error message.

For example, you can ensure that a job applicant provides their work experience before the job application case enters a Decision stage in which a manager approves or rejects the application. If the work experience fields are empty when the case reaches the Decision stage, the application displays an error message and the case stays in the current stage until the job applicant completes the necessary fields.
Before you begin: Create a case type, and then define a case life cycle that has stages and processes with assignments. Add the fields that you want to validate to the forms in your assignments. For more information, see Automating work by creating case types
Note: You cannot define entrance criteria for the Create stage. For more information, see The Create stage.
  1. In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
  2. On the Data model tab, click Validations.
  3. Select the cell that corresponds to the row of the field and the column of the stage for which you want to perform validation:
    • To define validation for a single-value field, click Add entry validation.
    • To define validation for a data relationship field, click Click to configure, and then click Add entry validation.
  4. In the Stage entry validation dialog box, define the validation conditions:
    ChoicesActions
    Define a validation condition for a field
    1. In the list of values, select Fields, and then select the name of the field that you want to validate.
      By default, the system provides the field that you select in step 3.
    2. In the comparator list, select the test that you want to perform on the field.
    3. In the value field, enter or select a value to compare against the user input.
    Apply an existing when condition as a validation condition
    1. In the list of values, select When conditions, and then select the name of the when condition that you want to apply.
    2. In the comparator list, select the test that you want to perform on the when condition.
    For example: To ensure that the birth date is not set in the future, select the birth date field from the list, set the is after comparator, and then select Today from the calendar control. When the user tries to submit the form with a birth date that is set in the future, the application displays an error message.
  5. Optional: To create a condition with multiple validation parameters, add a logical operator to the condition:
    ChoicesActions
    Ensure that the condition passes when all properties meet the criteria
    1. Click Add a row.
    2. In the operator list, select and.
    3. In the list of fields, select the name of the field that you want to validate or the name of the when condition that you want to apply.
    4. In the comparator list, select the test that you want to perform on the field or on the when condition.
    5. In the value field, enter or select a value to compare against the user input.
      The Select values option lists the fields and values that you can use in the condition.
    Ensure that the condition passes when any of the properties meet the criteria
    1. Click Add a row.
    2. In the operator list, select or.
    3. In the list of fields, select the name of the field that you want to validate.
    4. In the comparator list, select the test that you want to perform on the field or on the when condition.
    5. In the value field, enter or select a value to compare against the user input.
      The Select values option lists the fields and values that you can use in the condition.
    For example: In a recruitment form, the user indicates the time of employment at a specific company by entering dates in the From and To date type fields. To ensure that the start date is before the end date, and that the end date is after the start date, you can configure a validation condition with the AND logical operator.
  6. In the Stage entry validation window, in the Then display error message as field, enter the text to display when user input meets the validation conditions at run time.
  7. Optional: To select additional stages for which you want to perform the validation, in the To validate stage entry for the stages parameter, select the stages.
    By default, the system selects the check box for the stage that you select in step 3.
  8. Click Submit.
  9. Optional: To define more validation conditions, in the cell in which you want to add more conditions, click Add another validation, and then repeat steps 4 through 8.
  10. Click Save.
Result: If you configure validation for a single-value field, the cell displays a message for the condition. If you configure a validation for a data relationship field , the validation matrix cell displays Validated: Click to view for the top-level field and a message for the condition for the embedded fields.
For example:

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us