I need to fill the fill of this icon according to the text of each item, for example:
If thisItem = Diario, subtract the date below (in the case of the image 07.06) and the color will turn yellow if it is more than 24 hours (Daily). If it is less than 24 hours - or 1 day -, leave it green.
If ThisItem = Semanal, subtract the date below (in the case of the image 07.06) and the color will turn yellow if it is more than 168 hours (Weekly). If it's less than 168 hours - or 7 days - leave it green.
If ThisItem = Mensal, subtract the date below (in the case of the 07.06 image) and the color will turn yellow if it is more than 720 hours (Monthly). If it's less than 720 hours - or 30 days - leave it green. I think I managed to sum it up... It's like a "warning"
AND MY CODE IS APPARENTLY CORRECT BUT IT SEEMS THAT IT IS NOT CARRYING OUT THE TIME CALCULATION
LABEL 9 IN RED informing the date.
my code:
Switch(
ThisItem.Frequencia;
"Diario";
If(DateDiff(Now();Label9.Text; TimeUnit.Hours) <= 24; Color.Green;Color.Orange);
"Semanal";
If(DateDiff(Now();Label9.Text; TimeUnit.Hours) <= 168; Color.Green;Color.Orange);
"Mensal";
If(DateDiff(Now();Label9.Text; TimeUnit.Hours) <= 720; Color.Green;Color.Orange)
)
ThisItem.Frequencia = Column from SP List that contains "Diario", "Semanal", "Mensal"