Hi Team,
I am facing an issue while creating a Calculated Expression within a Dimension.
The expression uses nested functions where the outer function is Concatenate() and the inner function is Replace(). [Issue with…dimensions | Word]
Business Requirement
Based on assignment ownership, I need to display a status value:
- If Workbasket ID has a value, display"Unassigned".
- If Workbasket ID is null and Operator ID has a value, display"Assigned". [Issue with…dimensions | Word]
Issue
While configuring and executing the calculated expression, the system throws the following error:
Request failed with status code 500 [Issue with…dimensions | Word]
Screenshot 1 – Calculated Expression Configuration
Screenshot 2 – Error Message
Are nested functions such as
Concatenate() and
Replace() supported in Calculated Expressions for Dimensions?
- Are there any known limitations when using nested functions within Dimension calculations?
- Has anyone encountered a similar 500 Internal Server Error, and if so, what was the root cause and resolution?
- Is there an alternative approach to achieve the above requirement within Dimensions?
Any guidance would be greatly appreciated.
Thanks in advance! 
Environment: Pega Infinity (25.1.4)
Hello @Vinod_Kuncham
For your requirement, you might have to write a custom function alias rule with class Embed-UserFunction.
Below are the steps,
- Create a function alias rule in dev/infinity studio with necessary parameters and return values configured as inputs. Make sure you write the case-when logic and check the conditions to return appropriate values. For dynamic values, setup the property reference (SmartPrompt) and for static return values (TextBox) accordingly.
- There is an OOTB extension DT provided by pega (pyGetFunctionAliasesForDataViewsExtension) in the below documentation link Pegasystems Documentation . Extend this in your application ruleset to include the newly created function alias rule name so that it appears in the insights dropdown
- Select the newly configured FA rule from insights and pass appropriate values and setup this field in the columns. You should see the column with data derived after matching appropriate conditions.
Below are some working snapshots
If the custom column logic using FA is specific to an insight then you can follow the above approach of extending the DT and including the FA in the list. But if its a generic FA rule which has to be applied to the table wherever this RD is used, then configure it in the report definition used behind the data page used for insights on the column itself.
Hope this helps
Regards
JC
Thanks @JayachandraSiddipeta, for taking the time to share the detailed explanation and screenshots. We will replicate this approach and update you on the results. Appreciate your knowledge sharing and support.
Regards,
Vinod