Using A Truth Table To Validate Data
  • 12 Mar 2021
  • 1 Minute to read
  • Dark
    Light

Using A Truth Table To Validate Data

  • Dark
    Light

Article Summary

Example Lab Article
While Example Lab projects are resources for public use, articles and assets are not actively maintained. Screenshots and features are from the specified version below. These references may become dated as new versions are released.


Overview

Example Lab Details

Version6.12.1
Root FolderExample Lab-Using Truth Table To Validate Data
Modules None
DependenciesNone

This Example Lab demonstrates how to use Truth Table and Data Flow to validate data on a Form.


Explanation

The two important components to this project is the Data Flow and Validation Rule. For this example, a Form was built with the following elements: two textboxes, number box, and a checkbox. The user is required to input a string value for the pet type, either "cat or "dog" and a number input for the age, between 1 and 10. the Data Flow takes in these inputs. The Truth Table evaluates these inputs to see if they meet any of the criteria. It output the results. The result can be a diet plan, if the criteria is met, or "No Matches Found" if it is not met. The String Equals Rule checks for "No Match Found" output of the Truth Table.  The Create Data step contains a Boolean Variable. The Value is set to True or False based on the outcome of the Rule. The Data Flow outputs the Truth Truth Results and the Create Data Variable to be mapped in the Form Results textbox and  Validation Checkbox. The Result textbox on the Form is updated once the user enters the inputs and clicks off. There is also a Validation Rule on the Form. This Rule evaluates the Validation Checkbox on the Form. If the checkbox is marked off the Validation Rule will value to be False and a validation error message will be shown on the Form asking the user to modify their inputs.

Reference Articles



Project Download

The examples attached were developed to be instructional and were not developed as officially supported components. For more information or to engage our service team to develop fully supported, production quality solutions, please contact services@decisions.com. Import the project below to a Decisions environment on version 6.12.1 or later using our Importing/Exporting article.





Was this article helpful?