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 ๐Ÿ˜ƒ

0 2 173
2 REPLIES 2

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โ€,
)

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 =(

Top Labels in this Space