How do I clear the XML empty date value of 1/1/1900?

  • 3 January 2018
  • 4 replies
  • 12 views

Badge +9

The issue: a null date field in a repeating section gets thrown into the XML as 01/01/1900 00:00:00.

Extremely frustrating; it's shocking how Nintex can't even deal with an issue like this, automatically?

How do I update the XML so it clears the field? I'm not familiar with XPath so any guidance would be appreciated.

211868_pastedImage_1.png


4 replies

Userlevel 5
Badge +14

simple XPath like this should do the trick

//DateControlName

212034_pastedImage_1.png

Userlevel 5
Badge +12

Marian's solution directly answers your question, but another thought:   Are you feeding the XML directly into something (usually we use XPath to retrieve the important parts, or some other means to simply ignore the values on the receiving end)? Unless you need the XML itself to be pristine surrounding empty dates, there are many work around.  Just curious how you are utilizing the XML itself.

Another thought is that if the form is ever updates/changes, I believe the current XML will be overwritten, so you'd have to rerun the Xpath to overwrite the values again (just keep this in mind if the form gets modded).

Badge +9

I figured it out by introducing a calculated value on the form with the following function:

formatDate(DateControlName,'dd/MM/yyyy'), only then will Marian's suggestion work. Otherwise it wouldn't.

Userlevel 5
Badge +14

Hi Furst, could you clarify what exactly you mean with that?

how can one additional calculated control influence whether DateControlName XML node is cleared or not in workflow?

Reply