Question
Function Alias in Report
Hi!
Is there any way by using a Function Alias to compare the value in a column Source Report with a Valid of List Values, where the user sets the Input Value to use and provide the list of values to compare, like:
WHEN {1} EXISTS IN {2} RETURN TRUE
{1} Value to search in List{2}
I found an article in Pega Community mentioning to use the isinarray function, but I was not able to find it.
I want to create a report that classify a value according to the list in which exists.
Any ideas, please.
Hi,
isinarray
Checks if values or elements in an array are present in the array provided in the second argument. The following expression returns true.
isinarray(450, array(100, 450, 500, 700))
When the first element is an array, this function returns an array of conditions for each value.
isinarray(Products.Product.Name, Products.Catalog.Name)
By combining this function with the logical functions all and any, you can implement the following functionality:
• Check if all elements in the first array (subset) are present in the second array (superset). all(isinarray(Products.Product.Price, Products.Catalog.Price))
• Check if any elements in the first array are in the second array. any(isinarray(Products.Product.Price, Products.Catalog.Price))