infopath form - prevent to create new items if they pick week ending in the current week and after Wednesday 12PM

Moraes, Andre (Houston) 1 Reputation point
2021-01-21T21:25:22.777+00:00

is there a way to prevent new sp list items to be created/changed or using infopath forms to prevent the following
we want people to create their no of hours worked as overtime for pre-approval for current week or future weeks

so for current week they can do but only if before Wednesday 12PM
(week starts on Saturday before current week - so from Sunday to Friday)
for future weeks, time doesn't matter.
Ty

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Chelsea Wu 6,341 Reputation points Moderator
    2021-01-22T03:15:07.517+00:00

    SharePoint Online or InfoPath cannot restrict item creation in a time range. By default, all authenticated users with have access to the list and be able to create items as long as they have enough privilege (permission).

    Here are a few workarounds for this request:

    1. Use Power Automate to change user permission/list permission/item-level permission on schedule.
      Reference: Setting sharepoint item list permissions with flow.
    2. Disable access to SharePoint Online service using PowerShell and schedule the PowerShell Script using Task Scheduler.
      References: Disable access to Microsoft 365 services with PowerShell. / How to Schedule PowerShell Script using Task Scheduler.
    3. Configure ADFS for Office 365 to restrict access hours.

    Here is a UserVoice post on similar request you can vote and find related discussion: Ability to limit user logon hours.

    *Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. *


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    **Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. **


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.