Trouble with return in a check function

At first, sorry about my rusty english, than, lets go:
I need check if a DATE was the same of a DUE DATE, than return “AVISO” (NOTICE), to start a BOT.
The BOT thing I think’s ok, my trouble are with a return of DATE = DUE DATE.
So, I try this, on a virtual column I call CHECAR_VENCIMENTO (DUEDATE_CHECK)
first try:

SWITCH(
TODAY() + 3,
[PARCELA_01] , “AVISO” ,
[PARCELA_02] , “AVISO” ,
[PARCELA_03] , “AVISO” ,
[PARCELA_04] , “AVISO” ,
[PARCELA_05] , “AVISO” ,
[PARCELA_06] , “AVISO” ,
[PARCELA_07] , “AVISO” ,
[PARCELA_08] , “AVISO” ,
[PARCELA_09] , “AVISO” ,
[PARCELA_10] , “AVISO” ,
[PARCELA_11] , “AVISO” ,
[PARCELA_12] , “AVISO” ,
“OK”
)

When I fill the field, its ok, return to me the write value. But after send to DB and back to app, the field change to “AVISO” (NOTICE), even if it doesn’t meet the requirement.
So, my BOT don’t work, because receive a incorrect return.
Second try, same issue:

IFS(
(TODAY() +3 = [PARCELA_01]), “AVISO”,
(TODAY() +3 = [PARCELA_02]), “AVISO”,
(TODAY() +3 = [PARCELA_03]), “AVISO”,
(TODAY() +3 = [PARCELA_04]), “AVISO”,
(TODAY() +3 = [PARCELA_05]), “AVISO”,
(TODAY() +3 = [PARCELA_06]), “AVISO”,
(TODAY() +3 = [PARCELA_07]), “AVISO”,
(TODAY() +3 = [PARCELA_08]), “AVISO”,
(TODAY() +3 = [PARCELA_09]), “AVISO”,
(TODAY() +3 = [PARCELA_10]), “AVISO”,
(TODAY() +3 = [PARCELA_11]), “AVISO”,
(TODAY() +3 = [PARCELA_12]), “AVISO”,
TRUE, “OK”,
)

Anyone can help me whith this trouble?
ps.: PARCELA_XX means DUEDATE, AVISO is NOTICE
ps2.: Sorry if is too long and in wrong place =)

What column type are you using for the [PARECELA_XX] columns? Date? DateTime? Other?

And I assume your [PARCELA_xx] columns are dates in the future?

If the [PARCELA_XX] are defined as DATE data type then the expression should be good. If not, you can correct the expression using a DATE() function like so:

IFS(
(TODAY() +3 = DATE([PARCELA_01])), “AVISO”,
(TODAY() +3 = DATE([PARCELA_02])), “AVISO”,
(TODAY() +3 = DATE([PARCELA_03])), “AVISO”,
(TODAY() +3 = DATE([PARCELA_04])), “AVISO”,
...
TRUE, “OK”,
)
1 Like

I tryed, but not yet.
Same issue, showed the right return when I added, but after go and back do server, returned the wrong value =(