Configure Default Values and Validation Rules

When you configure fields on the Visual Form Editor, you can add a default value or a validation rule for fields and properties. You can also use formulas to configure visibility and visibility value.

  1. Click Configuration.
  2. Click User Types in the Users, Security, Integration section.
  3. Click Screen configuration.
  4. Expand the Application screens section and click the page that you want to change.
  5. Select the field for which you want to add a default value or a validation rule. If the field isn't added to the context layout, drag it to the work area.
    By default, the field is assigned with a visibility of Read-Write (RW).
  6. Follow these steps to change the default visibility:
    1. Click Add New in the Visibility section.
      The Visibility settings dialog appears.
    2. Select the required option in the Access mode section.
    3. To change the visibility based on a condition, add it in the Conditions section.
      You can add a formula to determine the condition for visibility. The conditions entered here are given priority over the visibility inherited by the field or property.
      Note: When setting up the visibility for a specific property, you can't create a visibility condition based on the property itself. For example, suppose that you want to set up the visibility of the property "City" as Read Write. You can't set up a condition such as "City contains New York". Further, ensure that there are no circular dependencies. For example, the Customer Name field is displayed if the Customer Address field is filled and the Customer Address field is displayed if the Customer Name field is filled. Although the application doesn't display an error message when you configure such fields, the page on which the fields appear might not work properly.
    4. Click Show conditions as formula to view the conditions as a formula.
      These rules apply to showing conditions as formula:
      • If you click Show conditions as formula, the standard conditions constructor hides and a text area appears containing the auto-generated formula of the conditions.

      • If you don’t change the auto-generated formula, the formula isn't saved. Show conditions as list is shown, so you can switch back.

      • If you change the formula and it differs from the auto-generated content, Show conditions as list is disabled.

      • If you change the formula and save the changes, the next time this dialog opens with the formula without the Show conditions as list link.

  7. Follow these steps to add a default value or a validation rule:
    1. Expand the Default value and validation section.
    2. Enter a value in the Default value field.
    3. Enter a validation for the value in the Validation field.
      You can use arithmetic operators, comparison operators, or functions to form the validation rule.
  8. Click Save.
    The details are saved and enforced when a user edits the corresponding page the next time.