I have a time field on a form that needs to be blank instead of defaulting to 12:00 am. How can I get the field to be blank?
*This post is locked for comments
But what is "blank time"? Time in AX is (by design) a number of seconds since midnight, i.e. empty time = number 0 = zero seconds since midnight = 12:00 am. And AX doesn't support null values in database.
Martin, that is what I suspected. However, the user of the form would like it to be blank so that the people in her department do not accidentally leave it at the default time of 12:00 AM. This time will appear on some shipping documents.
There isn't a way to set a time control's value to blank. However, if the control had it's Mandatory property set to "Yes", the user wouldn't be able to save a record without first changing the time.
Unfortunately it is not needed in every situation.
You can write your own validation logic, of course.Another (not very nice) workaround is to use an invalid value, e.g. -1. In that case, date control shows "??????".
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Community Member 4
Nayyar Siddiqi 2
NNaumenko 2