SharePoint Rule for Date Field

%3CLINGO-SUB%20id%3D%22lingo-sub-3100877%22%20slang%3D%22en-US%22%3ESharePoint%20Rule%20for%20Date%20Field%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3100877%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20been%20looking%20for%20an%20answer%20to%20this%20but%20haven't%20been%20able%20to%20find%20any.%20I'm%20hoping%20this%20group%20can%20help.%20I%20have%20a%20field%20called%20%22Desired%20Start%20Date.%22%20I%20am%20trying%20to%20set%20up%20a%20rule%20that%20warns%20the%20user%20when%20they%20select%20a%20date%20that%20is%20less%20than%207%20days%20in%20the%20future.%20I've%20tried%20using%20the%20condition%20where%20%22Desired%20Start%20Date%22%20is%20less%20than%20now()%2B7%20but%20that%20displays%20the%20message%20with%20every%20date%20selected.%20Even%20those%20greater%20than%207%20days%20in%20the%20future.%20Any%20ideas%3F%20All%20assistance%20is%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3100877%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ERules%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3101364%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Rule%20for%20Date%20Field%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3101364%22%20slang%3D%22en-US%22%3EAre%20you%20trying%20to%20use%20Conditional%20Formatting%20to%20show%20a%20warning%20message%3F%20If%20so%2C%20may%20be%20this%20might%20help.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fcolumn-formatting%23formatting-items-based-on-arbitrary-dates-advanced%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fdeclarative-customization%2Fcolumn-formatting%23formatting-items-based-on-arbitrary-dates-advanced%3C%2FA%3E%20%3CBR%20%2F%3EIf%20not%2C%20can%20you%20please%20provide%20more%20details%20on%20what%20steps%20are%20you%20taking%20and%20what%20use%20case%20are%20you%20trying%20to%20implement%3F%20(i.e.%20When%20user%20is%20creating%20an%20item%20%3F)%20.%20Also%2C%20are%20you%20using%20Infopath%20form%20and%20trying%20to%20set%20up%20a%20rule%20within%20Infopath%20form%20or%20are%20you%20using%20Power%20Apps%20form%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
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...