Friday, September 14, 2018

How to use function at column level in Decision Table in Pega ?

Context:

If there is a decision table, which returns CountryCode when matched with CountryName.
How to use a function at column level so that we can ignore case sensitiveness for CountryName column ? (equalsIgnoreCase at column level)

Decision Table with redundant rows:

In this example, when country is India or india or INDIA or inDIA or any other combination with case-sensitivity we have to return same value. How can we handle equalsIgnoreCase at column level which would be applied to each cell data?

CountryNameCountryCode
IndiaIN
indiaIN
INDIAIN
inDIAIN

Decision Table with column which handles equalsIgnoreCase:

If condition is handled at column level, it is easy to maintain a single record instead of redundant data in decision table.

CountryNameCountryCode
IndiaIN

Answer:

@equalsIgnoreCase(Param.CountryName, "<current-value>")
<current-value> refers to magnitude of cell of a particular row of decision table during evaluation.
Note: Similarly any function can be used at column level with <current-value>

1 comment:


HowToPega : All rights reserved and the contents are copyrighted to Pavan Kumar Naidu