Type As Lookup List
  • Updated on 28 Dec 2016
  • 2 minutes to read
  • Print
  • Dark
    Light

Type As Lookup List

  • Print
  • Dark
    Light

This tutorial demonstrates how to use User Defined Types as Lookup Lists in Decisions . In Decisions 4.0 we can create User Defined Type and use its instances as System Constants .
Example:
In this example we are going to create aDatabase Structure and use it as a Lookup List in simple Rule .
We begin in the Designer Folder with clicking Datatypes/Integrations > User Defined Types > Database Structure on the Folder Actions Panel.
2018-01-09_141601-1024x540.png

In Database Structure window we Name our structure. Then, we defineData Members: First Name, Last Name , and Car . Next, we check Is Lookup List checkbox. Validation message shows up informing us that we need to specify single field for lookup description.
2018-01-09_141726.png

We select First Name field and check Is Lookup List Key Field checkbox. Then, we can click Ok to save our Database Structure and continue.
2018-01-09_141850.png

For this example we created three records in ourDatabase Table.
2018-01-30_143234.png

Back in the Designer Folder we are going to create a simple Rule to demonstrate how to use Defined Type as Lookup List. We click Create Rule > Create Rule on Folder Actions Panel. Then, we Name the Rule and click Ok to proceed to the Rule Designer .
2018-01-09_142404-1024x615.png

In the Properties panel under Default , select Show Editor under Rule Input Data . Our Rule Input Name is Car and its Type is String . We click CLOSE to save and continue.
2018-01-09_142547.png

Back in theStart Rule window we click Add New Rule Step.
Our Names And Cars Defined Database Structure is present as System Constant for theRule/Flow data. We pick our Car Rule Input and click Next .
2018-01-30_143547-1024x540.png

In the Verb definition window we pick Equals and click Next .
2018-01-30_143717-1024x540.png

Then, in the value window we use Select Value Mapping Type and click Pick Path link.
2018-01-30_144000-1024x540.png

In the resulting window we expand our Names And Cars lookup list… We should be able to see all Records from our Defined Type Table . We can expand a Record and pick any field. In this example we pick Car and click Ok .
2018-01-30_144046-1024x540.png

This completes our Rule Phrase. We click Done to save and continue.
2018-01-30_144122-1024x540.png

Our Rule is completed. We Close Edit Rule window.
2018-01-30_144148-1024x540.png

Next, we clickDebug Rule on top panel of the Rule Designer to test our Rule .
2018-01-30_144229.png

In the Rule Debugger we define Car Rule Input and click Run .
2018-01-30_144259-1024x540.png

And our Rule evaluates True .
2018-01-30_144310-1024x540.png

Was this article helpful?