Notifications
Clear all

[Closed] Finding minimum with Expression Controller?

I’m trying to find the lowest value of a group of values using an Expression Controller. The Min function works, but only for comparing two values as far as I can tell.

min(val1,val2) -- works
min(val1,val2,val3) -- throws parsing error

Is there another way of comparing more than two values to return the lowest that will work in expression controller syntax? Or do I have to use a Script Controller?

4 Replies

What’s wrong with using for example min(val1,min(val2,val3))?

3 Replies
(@gazybara)
Joined: 11 months ago

Posts: 0

Or maybe

 amin #(val1,va2,va3)
(@denist)
Joined: 11 months ago

Posts: 0

they are talking about expression controller

(@pacermike)
Joined: 11 months ago

Posts: 0

Expression controllers don’t let you use MXS syntax so I couldn’t figure out a way to find the minimum of an array like this. But thank you.

This seems to work though! I didn’t know / never thought of daisy-chaining them like this. Thanks for both your answers