Column Validation check passes on Create but fails on Edit
-
06-02-2021 - |
Domanda
I'm trying to validate that a month column is within 30 days of the create date in SharePoint online using the validation below:
=AND([Start Month]<(Created+30),[Start Month]>(Created-30))
This works as expected when creating a list item, failing when the date is outside of the range, but when editing rows it always gives me an error even if I haven't changed the Start Month column.
Any ideas what I'm doing wrong?
Soluzione
Per my test, I can reproduce your issue in my environment.
You could try this workaround:
1.Create a calculated column, and use this formula : =[Start Month]-[Created]
2.Change the list validation to this: =AND([calculated]<30,[calculated]>-30)
Altri suggerimenti
I recreated your use case and ran into the same issue. However, I looked at the default settings for the 'Created' column, I realized that it defaults to the 'Friendly' setting (meaning it spells out the date in words as opposed to using a number format, i.e. 3/21/2019). Once I switched it to 'Standard', your formula worked as expected.