SharePoint Rule for Date Field

New Contributor

I have been looking for an answer to this but haven't been able to find any. I'm hoping this group can help. I have a field called "Desired Start Date." I am trying to set up a rule that warns the user when they select a date that is less than 7 days in the future. I've tried using the condition where "Desired Start Date" is less than now()+7 but that displays the message with every date selected. Even those greater than 7 days in the future. Any ideas? All assistance is appreciated.

4 Replies
Are you trying to use Conditional Formatting to show a warning message? If so, may be this might help.
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting#formatti...
If not, can you please provide more details on what steps are you taking and what use case are you trying to implement? (i.e. When user is creating an item ?) . Also, are you using Infopath form and trying to set up a rule within Infopath form or are you using Power Apps form?

@Dhiren Mehta I'm trying to have SharePoint show this warning when the user creates an item that is

less than 7 days in the future. I thought I could do something similar to the image attached. The problem

seems to be that it displays on every date, not just those dates that would fall between the date and 7 days from now.

infopath example.PNG

I figured it out. I created a field called minimum start date and used the adddays function to add 7 days to now(). Then I just had to make sure that the desired start date was less than the minimum start date in order to display my warning to the creator.

@Analyst_NK  That's great. I was just reviewing the documentation and found following documentation suggesting in the same direction. I hope this helps as a reference for any future work.
https://support.microsoft.com/en-us/office/add-formulas-and-functions-in-infopath-2010-a14c7efd-9884...

DhirenMehta_0-1643754129465.png

https://support.microsoft.com/en-us/office/add-rules-for-performing-other-actions-5322d726-b787-4e5f...