I've made a flow which sends an email with a formatted table. The colour of cells change depending on a SharePoint item's field value (Low = Green, Med = Yellow etc):
In the above example the item has 4 fields: Low, Med, High and Highest. However this may not always be the case, an item may have 1 'Low' field, or may have 4 'Highest' fields or could have any combination in-between.
I want to include some text within the email which states the maximum value listed in the table (Highest being the max, Low being the min). In the above example the text should read 'Highest' as this is the max value, however this may not be the case for every item. I am not sure what logic would be required to define what the max value present is. Could anybody please assist?
This is what my flow currently looks like:
I use switches in order to set variables based off the SharePoint field value, then reference those variables in the email.
Any help would be appreciated.
EDIT: I think I need something which looks like this, but Flow is not accepting this expression
if((variables('Risk Level 1') or variables('Risk Level 2') or variables('Risk Level 3') or variables('Risk Level 4')), contains("Highest")), "Highest",
if((variables('Risk Level 1') or variables('Risk Level 2') or variables('Risk Level 3') or variables('Risk Level 4')), contains("High")), "High",
if((variables('Risk Level 1') or variables('Risk Level 2') or variables('Risk Level 3') or variables('Risk Level 4')), contains("Med")), "Med",
if((variables('Risk Level 1') or variables('Risk Level 2') or variables('Risk Level 3') or variables('Risk Level 4')), contains("Low")), "Low"))))





