Defining Restrictions for a Control on a Default Form

In this task you define restrictions for a control on a default form by specifying them in the Properties view for the business object model.

Defining additional constraints in the business object model for attributes in a class will result in those constraints being carried over to the control on the default form. For example, if the zip attribute is defined as an integer having five-digits, then the control will have the same restrictions. A validation will be performed when the end user enters a value for the control.

Procedure

  1. Open the business object model in the editor.
  2. Select the zip attribute in the Witness class.
  3. In the Properties view, click the Advanced tab. Change the Maximum text length to 5, and enter the following regular expression as the Pattern: ^\d\d\d\d\d$.
  4. Right-click one of the two user tasks whose interface is configured with data defined in the business object model. Click Form > Preview. Experiment with different values in the zip column of a row in the Witness table by entering a value and clicking outside the table. Notice that an error message is displayed when an invalid zip value is submitted.

Result

Next Steps

You can now:

  • Install the solution to this Tutorial and compare it with your version. See the instructions in the following section for how to do this.
  • Proceed to the next tutorial "How to Use Structured Data in a Form," which describes how to use complex data, as described in a business object model.
  • Optionally, you can assign participants to the user tasks. To do this:
    1. Assign a position in the organization model (from the project EasyAsExtendedOMSolution that you imported earlier) as the participant for each of the user tasks. The How to Design a Simple "WelcomeUsers" Process tutorial describes how to do that.
    2. If you wish, you can then deploy the project, as described in the How to Implement and Deploy the "Welcome Users" Application for deploying the "WelcomeUsers" project.