Requirements:
Create HTML Report from items that are expiring in 45 days and change the text color based on 3 date values.
Example:
Items expiring in 45 Days = Green.
Items that are expiring 30 Days = Orange
Items that are expiring 20 Days = Red
Issue:
The following Expression is working for two items. Can't seem to capture items expiring in 20 days. Need help on expanding this expression to include items expiring in 20 days (red)...Thanks
If (empty(item()?['EndDate']), '', if( lessOrEquals( item()?['EndDate'] , addDays(formatDateTime(utcNow(), 'yyyy-MM-dd'), 30, 'yyyy-MM-dd')),
concat('<span style="color:orange">', item()?['EndDate'], '</span>'),
concat('<span style="color:Green">', item()?['EndDate'])))