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

Type As Lookup List

  • Print
  • Dark

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 .
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.

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.

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.

For this example we created three records in ourDatabase Table.

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 .

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.

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 .

In the Verb definition window we pick Equals and click Next .

Then, in the value window we use Select Value Mapping Type and click Pick Path link.

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 .

This completes our Rule Phrase. We click Done to save and continue.

Our Rule is completed. We Close Edit Rule window.

Next, we clickDebug Rule on top panel of the Rule Designer to test our Rule .

In the Rule Debugger we define Car Rule Input and click Run .

And our Rule evaluates True .

Was this article helpful?