CUSTOM_MAXreturns the maximum element in a list as described by a second list. The second list gives the assigns a value to items in the first list in ascending order. If an element of the first list is not present in the second list, it is considered lower than all mentioned elements
Given a list of case colours like
[red, green, green]we would like to return the maximum as described by
[green, orange, red], where green means lowest value and red means highest value, so saying that red cases are most important:
CUSTOM_MAX([red, green, green, orange, green], [green, orange, red])
This will return
red, as this is the maximum in the first list as described by the second list.