Creating Composite Type in Truth Table
  • 15 Aug 2024
  • 2 Minutes to read
  • Dark
    Light

Creating Composite Type in Truth Table

  • Dark
    Light

Article summary

Overview

A Truth Table receives user data and evaluates it against configured conditions based on input data. A Truth Table can create a data type to represent combined outputs called a Composite Type. It is used to output multiple rows of a Truth Table with multiple outputs.


Example

The following example will take in a Zip Code and output the city and state as a composite type.

  1. In the Designer Project, click CREATE RULE and select CREATE. Click Truth Table and select External Truth Table. Name the External Truth Table and click CREATE.
  2. Click SETUP INPUT DATA.
  3. In the Input Data window, enter "Zip Code" in the Name field and change the Type to Int32 [Number]. Click Save and close the window.
  4. Click [Select Data Element] and select Zip Code. Click CLOSE.
  5. For [Pick Verb] window, select Equals and click CLOSE.

  6. Hover over the Default Output Data column and click the pencil icon.
  7. On the Edit Output Data window, enter "City" in the Name field and change the Type to String [Text]. Click OK.
  8. Click the plus next to the City column and add a column with the name "State". Click OK.
  9. On the Properties panel, click EDIT EXTERNAL DATA TRUTH TABLE.
  10. Under Data Sources on the Report Designer, click Add. In the search box, enter "csv" and select CSV/Excel Data Source.
  11. On the Properties panel under the [SETTINGS] category, click Choose a File under CSV or Excel File, Select a file and click OPEN.
  12. Select the Zip Code Data Field under Data Fields. On the Properties panel under the SETTINGS category, change the Title to Zip Code Equals.
  13. Click Save and close the Report Designer.
  14. On the Properties panel of the Rule Designer, select the Create Composite Type option. Uncheck the Has No Match Outcome option under the Truth Table. Click Save and close the Truth Table.
  15. In the Designer Project, click CREATE FLOW. Name the Flow and click CREATE.
  16. Click the Done path of the Start step. Select the Run Truth Table step and click ADD.
  17. On the Properties panel, select PICK OR CREATE TRUTH TABLE and select PICK. Locate the External Truth Table and click PICK.
  18. Connect the Done path to the End Step.
  19. Select the Run Truth Table step and enter "23325" in the Zip Code field under the INPUTS category.

  20. Click Save to save changes to the Flow.



Debug

  1. On the top action bar, click Debug and click START DEBUGGING.
  2. After the debugger runs, select the Truth Table step, select Execution 1, and select View Input/Output Data. A window will appear that will display the composite data created from the result of the input.

Was this article helpful?