Question

Problem with AND-Validation

  • 9 January 2024
  • 4 replies
  • 35 views

Badge +3

Hi there! I wanted to use 

und(zuDatumKonvertieren(Termin)>zuDatumKonvertieren('16.03.2024'), zuDatumKonvertieren(Termin)<zuDatumKonvertieren('14.04.2024')

to give a message, when input is for example 01.04.2024 , BUT it appears the rule does not work. 

What do i wrong?

Best wishes, 

Jacob

 


4 replies

Userlevel 1
Badge +6

Make sure you match parenthesis, they don't match in the rule you’ve provided.

Userlevel 6
Badge +16

Hi @putzjakob 

Apart from @BobR comment, the AND function only return TRUE or FALSE

 

Badge +3

@BobR Where are they missing in the expression?:

und(zuDatumKonvertieren(Termin)>zuDatumKonvertieren('16.03.2024'), zuDatumKonvertieren(Termin)<zuDatumKonvertieren('14.04.2024')

THANKS!!!

Userlevel 1
Badge +6

You’re not closing the and function. I think what you’re aiming for is und(zuDatumKonvertieren(Termin)>zuDatumKonvertieren('16.03.2024'), zuDatumKonvertieren(Termin)<zuDatumKonvertieren('14.04.2024'))

Note the last parenthesis, the first closes the ConvertToDate function, the second closes the and function.

I’m also not entirely sure if the ConvertToDate function works like that. I’ve never used it myself, but I’d imagine it also needs a date format input so Nintex knows the format you are inputting the date as (like which is the day, month, year). At least if you convert strings to dates in Workflow you do need to provide that, I’d be surprised if Form could do it without.

Finally, if Termin is already a date control, (as in the user inputs it on a dateTime field) it doesn’t need to be converted into a date again, I think ConvertToDate will probably fail if it gets input other than a single line text.

Reply