Trying to expand my heating logic

Hello,

I am trying to expand my heating logic using PLEG and I am going from a simple setup to a little more complex.

I wanted to know if there was a way to find the largest value out of a set of device properties (all numbers). So for example:

Condition:
p1 > p2,p3,p4,p5
Action
d1setpoint={(p1setpoint})

I would then repeat this for each comparison to set the heating to the highest call for heat.

Please let me know if there is any other information you need.