Skip to content

Constraint

It verifies the uniqueness(duplication) or integrity of the data to be saved.

  • How-To

Image1. Constraint basic settings screen

  1. Constraints are typically set for events where users input data by clicking or touching buttons.
  2. To receive the results of duplicate or integrity checks, set the Type to Property and the Target to Control.
  3. Set the Control Property selected in the Constraint Action to the Property of the Control to be validated for duplicates or integrity.

Image2. Control Property declared and Constraint check results received for use in Condition Action

  1. Click Next to configure the parameters required by the Constraint. Set the Control to be validated for duplicates or integrity as the Parameter Key.

Image3. Example of Duplicate

  1. Unlike other actions, Constraint is set in three stages. In the second stage, set the Parameter key entered earlier as Param. Then, select the Business Object Field to compare duplicates with the Param set as Control, and set the comparison criterion.
  2. Group is set to compare multiple Business Object Fields with an "and" condition. For updates, add a "not equal" condition for sysId to exclude the modified data from the comparison.

Note: Constraint executes an SQL query that creates and executes a WHERE clause with and conditions based on the Group criteria. If the query finds data, it returns No. If multiple groups are set in the Constraint and one group returns No, the result is No.

Appendix. Using Consistency to limit the input to 4 digits

  1. In the View Attribute of the Control where the digit limitation is desired, set Properties > Length > Maxlength to 4.
  2. In the Action Designer's Constraint settings, set the Mapping Control Name to the Control where the Click Event occurs.

Appendix 2

  1. Select the Control you want to check the input digits for and set the Parameter Key.

Appendix 3

  1. Choose Action consistency, select Data Length for Operation. Select the Parameter Key entered in step 3 for Source Param, and set Operation Value to 3.

Note: If you input 100 for the fare code, it will be replaced by the data length 3. It will then compare against the set Operation Value, and based on the result, it will return data.success as Yes.

Appendix 4

  1. Display Constraint validation errors to users via Alert.

Appendix 5