0

I am back at this form I have people fill out in SharePoint Designer and have a new small issue, here is my formula:

=AND([Requested Posting Date]>=[Date of Request]+1,IF([Date of Request]="New",[Date of Request]>=TODAY(),TRUE))

If they choose today's date (The Date of Request field) they have to choose at least One (+1 day) (the Requested Posting Date) into the future and everything is working there, but they can choose a past date which is causing some issues.

How would I go about setting up the formula above that I am currently using to only allow you to choose today's date for the Date of Request field and nothing in the past? Let me know how I would set it up so they can't choose past dates with the formula above in a SharePoint form.

It is for people requesting work or tasks to be completed by me and I have two date pickers. I just need to know how to get the date pickers to not allow you to choose a past date, as if they were grayed out (the past dates, that is); how would I write that?

  • How do people fill out a form in SharePoint Designer? – teylyn May 10 '16 at 20:34
  • Is this right? ...IF([Date of Request]="New"... I think your "Date of Request" field is supposed to be a date field, in which case it can't have a text value of "New". – Dan Henderson May 11 '16 at 20:15
2

Add the Column validation to your date column as follows: [DateColumn] > Today() and set the custom error message. What is better than a screen shot!

enter image description here

  • Might this cause a problem if a user tries to edit this item next week? – Dan Henderson May 10 '16 at 19:09
  • the validation happens when you create or edit the column! – Ahmed Mahmoud May 10 '16 at 19:11
  • Wait, so if I create an item in the list today, set myDate to tomorrow, and save; and then if 2 days later I edit the same list item and change another field, but don't change the myDate field; you are telling me that the validation will not prevent me from saving at that time? – Dan Henderson May 10 '16 at 19:15
  • sorry the validation only happens when the item is created not edited! – Ahmed Mahmoud May 10 '16 at 19:18
  • 2
    Column Validation is Column Validation and will always be executed, on New Forms, on Edit Forms, even if you change a Column with JSOM, CSOM, REST or PowerShell code (you can't update an Item if any Column Validation rule fails) So yes, using TODAY() in a Validation Rule has some side effects you most often do not want. That's why we usually add validation in JavaScript Code to the Forms [PreSaveAction] see: sharepoint.stackexchange.com/search?q=presaveaction – Danny '365CSI' Engelman May 11 '16 at 8:42
1

Please go to list settings -> Validation and add this formula.

=[Due Date] > [Created]

Even for new items the created date is set for today and when you edit the item you should be fine.

  • How would I connect something like that to this current formula I have, I have tried a bunch of different ways of trying to add what you all said but just get errors, please let me know what I would add to this formula here to not allow people to choose dates in the past on the Date of Request field, please let me know what I would add to this formula to allow that: =AND([Requested Posting Date]>=[Date of Request]+1,IF([Date of Request]="New",[Date of Request]>=TODAY(),TRUE)) ????? Thanks! ???? – Schell ShockDesigns May 12 '16 at 16:03
  • Replace TODAY() with [Created] and be sure you are specifying this validation in list settings, not in the column. – luccio May 15 '16 at 7:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.