Valid if and invalid value error message

Hi,

in valid if i’ve this expression that works properly:

AND(OR([SCADENZA]>[DA FARE],[SCADENZA]=[DA FARE]),

ISNOTBLANK([DA FARE]),NOT(
IN(WEEKDAY([SCADENZA]),LIST(1, 7))))

While in Invalid value error, the error message not works properly in particularly when insert a SCADENZA on Saturday / Sunday i receive a System message Data entry is invalid instead of

La SCADENZA non può essere di Sabato o Domenica

Why ?

IFS

(ISBLANK([DA FARE]),“Inserisci anche la data DA FARE dell’attività!”,

[SCADENZA]<[DA FARE], “La SCADENZA deve essere uguale o successiva a DA FARE!”,

NOT(IN(WEEKDAY([SCADENZA]),LIST(1, 7))), “La SCADENZA non può essere di Sabato o Domenica”

)

Please try

IFS

(ISBLANK([DA FARE]),“Inserisci anche la data DA FARE dell’attività!”,

[SCADENZA]<[DA FARE], “La SCADENZA deve essere uguale o successiva a DA FARE!”,

IN(WEEKDAY([SCADENZA]),LIST(1, 7)), “La SCADENZA non può essere di Sabato o Domenica”

)

1 Like

Hi,

unfortunately it still continue not to work, please see pic, instead of show the error correct “La SCADENZA non può essere di Sabato o Domenica” it shows Inserisci anche la data DA FARE dell’attività!" but as you can see the data DA FARE is available … any hints ?

Inverting the error message it works, thank you so much @Suvrutt_Gurjar

IFS

(IN(WEEKDAY([SCADENZA]),LIST(1, 7)), “La SCADENZA non può essere di Sabato o Domenica!”,

ISBLANK([DA FARE]),“Inserisci anche la data DA FARE dell’attività!”,

[SCADENZA]<[DA FARE], “La SCADENZA deve essere uguale o successiva a DA FARE!”,

)

1 Like

You are welcome.

Yes, since valid_if error message checks for invalidity, the conditions typically need to be opposite of those for validity, that is conditions in the valid_if constraint setting.