How to make a default Date column in a library required?
-
29-09-2020 - |
Question
I've got a Picture Library which contains entries and has a default Date column based on the Date and Time type. For some reason, this Date column lacks the option to set it to be Required:
If I create a new custom column and give it the Date and Time type, however, I can set it to Required, amongst other things:
...but I don't want two Date fields duplicating the same data, I just want to set the default Date field to Required. It looks like this should be possible, since there's a space for it in the list, but I can't find any way to put a tick in that column:
All my custom columns can be set to Required, including ones which have some existing entries where that column is blank. For the default fields, however, that option is hidden, with no explanation as to why.
How can I set the default Date field to Required?
Solution
I still don't understand why this can't be done the normal way, but I've found a workaround.
- Go to Validation Settings under General Settings on the library settings page
- In the Formula box, enter
=NOT(ISBLANK([Date]))
(whereDate
is the name of the column) - Write in a meaningful custom message under "User message" along the lines of "Date cannot be blank"
The only downside of this is, it doesn't register as being required so the user doesn't see a * next to the column name telling them it's required. If way to set it the normal way emerges, use that.
Alternatively, you could use Column default value settings under General settings to give the Date column a default value based on today's date, which reduces the likelihood of it being blank.