That would be 431483, 256024 and 431618 in this example. I couldn't figure it out using max() because that takes exactly 2 parameters and I may have more.
So this is what I came up with:
value == row.record.cells['media_%0'].value.sort()[row.record.cells['media_%0'].value.length()-1]
first sort the array default low to high, then select the last item in the array.
Marks the highest in the set true, the other ones false.
One could argue that it's code golfing. I wouldn’t disagree. But it works.
Square brackets can also be used to get substrings and sub-arrays, and single items from arrays:
Example
Description
value[1,3]
A substring of value, starting from character 1 up to but excluding character 3
"internationalization"[1,-2]
Will return “nternationalizati” (negative indexes are counted from the end)
row.columnNames[5]
Will return the name of the fifth column
Any function that outputs an array can use square brackets to select only one part of the array to output as a string (remember that the index of the items in an array starts with 0).
For example, partition() would normally output an array of three items: the part before your chosen fragment, the fragment you've identified, and the part after. Selecting only the third part with "internationalization".partition("nation")[2] will output “alization” (and so will [-1], indicating the final item in the array).
I’m sure if some improvement / addition to the documentation could be suggested this could be implemented