SOLVED

Sharepoint date restriction

Copper Contributor

Hi Guys, 

Need a quick help with this one. 
I need to create a flow that reads from a sharepoint list (this is not an issue) 


The issue is, On the SharePoint list I want to have 2 date fields. Once for start date and another for End date. 
Is there any way or any formulae that can restrict the first date field to only allow to select a Monday's date of any month? and then the second date field automatically populated as the Sunday of the week selected on the first date field. or just adds 5days to the first date field. 

 

soloadmin_0-1676497359879.png

 

Or maybe any other ways on sharepoint that allows user to Select Start day as Monday and end day as sunday. Or restrict them to select a specific date basically a whole week.

 

Thanks

 

2 Replies
best response confirmed by soloadmin (Copper Contributor)
Solution

@soloadmin 

 

You can assign Column Validation in Date1 column by going to List Settings -> and Click on  your column name i.e. Date1

 

=WEEKDAY([Date1])=2

 

kalpeshvaghela_0-1676524512684.png

 

kalpeshvaghela_3-1676525228649.png

 

 

Using above validation user will not able to save any other date than Monday.

 

Now for Date2 field, instead of creating column of type Date and Time, you can create Calculated Column with following formula:

 

=[Date1]+6

 

kalpeshvaghela_4-1676525333270.png

 

Now it will set Date2 automatically

 

kalpeshvaghela_5-1676525392450.png

 

So in this approach, you don't need any Power Automate to achieve your requirement


Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community

 

Too good.
Worked like a charm.
Thanks mate.
1 best response

Accepted Solutions
best response confirmed by soloadmin (Copper Contributor)
Solution

@soloadmin 

 

You can assign Column Validation in Date1 column by going to List Settings -> and Click on  your column name i.e. Date1

 

=WEEKDAY([Date1])=2

 

kalpeshvaghela_0-1676524512684.png

 

kalpeshvaghela_3-1676525228649.png

 

 

Using above validation user will not able to save any other date than Monday.

 

Now for Date2 field, instead of creating column of type Date and Time, you can create Calculated Column with following formula:

 

=[Date1]+6

 

kalpeshvaghela_4-1676525333270.png

 

Now it will set Date2 automatically

 

kalpeshvaghela_5-1676525392450.png

 

So in this approach, you don't need any Power Automate to achieve your requirement


Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community

 

View solution in original post