How to Populate a Value List Using a Decision Table
In this tutorial, you'll learn how to populate a Value List property named 'NamesList' with city names based on Country and State values provided via a parameter page.
While multiple approaches exist to achieve this functionality, this specific method using Decision Tables provides a clear example.
Prerequisites
The property we'll be working with is shown below for reference:
Step-by-Step Instructions
Step 1: Create a Decision Table
Create a Decision Table (I've named mine 'SelectNameList').
Step 2: Configure the Results Tab
On the results tab within the rule, select the 'Evaluate all rows' checkbox.
Step 3: Set Up Comparison Columns
Populate your table with the columns that will be used for comparison. In this example, we're using State and Country.
Step 4: Configure the Actions Column
In the 'Actions' column, set the property with '.NamesList()' and use the operator '='.
Step 5: Test the Rule
To test this rule, create a Data Transform and call the Decision Table:
@DecisionTable.ObtainValue(tools,Top,"SelectNameList",true)
Step 6: Verify the Results
You can verify the results by checking the tracer or by using the 'IsInPropertyList' function:
@IsInPropertyList("Orlando", .NamesList)
References
- https://community.pega.com/knowledgebase/articles/decision-management/8…
- https://community.pega.com/knowledgebase/articles/user-interface/84/val…