How to use max function for more then 2 parameter in pega ?
New Stress Rate =
Max of (P1,p2,p3,p4,p5) Param1
param2
param3
Param4
param5
***Edited by Moderator Marije to add Capability tags***
New Stress Rate =
Max of (P1,p2,p3,p4,p5) Param1
param2
param3
Param4
param5
@RaghavN2 To use the max function for more than two parameters in Pega, create a custom function that takes multiple parameters and returns the maximum value. Use this function in your Data Transform or Activity to calculate the maximum value of the parameters.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references
Hi @RaghavN2,
You can try either of the 2 approaches mentioned below,
- You can call the function with 2 parameters recursively. Ex: max(p1, max(p2, max(p3, max(p4, p5))))
- Store all the data from the parameters into a Pagelist and utilize the OOTB max function. This will allow you to have the no. of parameters dynamic and can avoid having to make recursive calls of the same function.
Discussion
Question Solved
Question
Discussion
Discussion
Discussion
Discussion
Discussion
Question Solved
Question Solved
Pega Collaboration Center has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.