Validating Field Values

For many situations, you might want to place limits on the values Primavera Unifier will accept for numeric fields on a form. For example, a budget transfer might move monies from one CBS code to another. In this situation, the transfer must show a net zero amount. For this case, you would want to validate the amount field to verify that it equals zero. At runtime, Primavera Unifier will validate the value in the amount field and display an error message if the value exceeds zero.

For other situations, you might require that the user fill out one or more fields before leaving a form. For example, for a list of five checkbox items, you might require users to check at least three out of the five.

For this validation, you could include a hidden field on the form containing a formula that adds the value of each checkbox (checked = 1, unchecked = 0). If the value of this hidden field is less than 3, the user will not be allowed to leave the form. By data definition, checkboxes are integers, and you cannot place a formula on an integer field; however, you can use integer fields in formulas. The hidden field in this example must, therefore, be a decimal field that holds the total value of the check boxes. That decimal field must be greater than or equal to 3 for this validation. At runtime, Primavera Unifier will validate the value in the hidden field and display an error message if the value is not greater than or equal to 3.

To validate fields, you need to create validation rules and then apply them to the field when you design the form.

To create a validation rule

  1. Open the form that contains the field you want to validate. The Form Designer window opens.
  2. Click the Validation button in the Designer window toolbar. The Validation Rules window opens.
  3. Click the Add button. A Validation Rule window opens.
  4. In the Name field, enter a name for this rule.
  5. In the Expression field, click the Formula button. The Formula Creation window opens.
  6. On the left pane, double-click the element you want to validate to move it to the right pane. Then click OK to close the window.
  7. In the Condition field on the Validation Rules window, click the down arrow and choose the criteria the field value must meet, such as "Greater than or equal to."
  8. In the Value field, enter the value the field must not exceed.
  9. In the Show this message... field, enter the error message the user should see if the field value exceeds the value you specified.  You can enter up to 400 alphanumeric characters.
  10. Click OK.

To apply a validation rule to a field

  1. In the Form Designer window, select the cell containing the field you want to validate.
  2. Click the Validation button on the toolbar. The Validation Rules window opens.
  3. Select the rule you want to place on this field and click Close.


Legal Notices | Your Privacy Rights
Copyright © 1998, 2020

Last Published Friday, April 9, 2021