Skip to main content
Nintex Community Menu Bar
Question

Problem with AND-Validation

  • January 9, 2024
  • 4 replies
  • 49 views

Forum|alt.badge.img+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

  • January 9, 2024

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


Garrett
Forum|alt.badge.img+16
  • Scout
  • January 9, 2024

Hi @putzjakob 

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

 


Forum|alt.badge.img+3
  • Author
  • Rookie
  • January 9, 2024

@BobR Where are they missing in the expression?:

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

THANKS!!!


  • January 9, 2024

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.