Number of arguments for ExpressionEngine 'max()'


#1

I was writing a compound metric and was getting an error when I tried to do

max(TS1, TS2, TS3, TS4, TS5, TS6)

but not

max(TS1, TS2, TS3)

So I split the first expression into max(max(TS1, TS2, TS3), max(TS4, TS5, TS6)), and it worked. Does this mean that max() has a cap to the number of TS inputs, and is there any way to get around it? I tried putting the list in square brackets, but that did not work.


#2

@kasden Ideally there should NOT be any cap on the number of arguments. In order to speed things up, we compile our expressions and make the JVM call the exact signature of the function being used, this helps us get almost 100x faster performance in comparison to regular java code. It comes with a caveat that every signature needs to be pre-generated. Having said that, the user should be hitting this issue and it should be abstracted from the end user. Can you please file a ticket with services & we’ll find an elegant way to handle this.