I have 3 published parameters where the user inputs values for buffers. All three were created as Numeric parameters, with numeric precision set to Integer. I would like to extract the largest buffer value in a python scripted parameter. This is the code I’m using in FME 2023 (build 23332)
buffer_list = tFME_MacroValuesl'BUFFER1'],FME_MacroValuesl'BUFFER2'],FME_MacroValuesl'BUFFER3']]
buffer_list.sort(reverse = True)
return buffer_listl0]
What I’ve discovered is that if the 3 buffers are the same number of digits, the script will return the correct value. If the number of digits is different, it will not. Some examples:
10, 40, 50 = 50 (correct)
120, 60, 70 = 70 (incorrect)
120, 180, 70 = 70 (incorrect)
120, 200, 300 = 300 (correct)
It doesn’t matter which order the values are input, nor does it matter how the parameters are sorted in the parameter list.
Is this a bug, or am I missing something?