Type As Lookup ListLast Updated: 03/28/2018 Introduced in Version: 4.0
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 a Database 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 define Data 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 our Database 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 the Start Rule window we click Add New Rule Step.
Our Names And Cars Defined Database Structure is present as System Constant for the Rule/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 click Debug 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.