web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Prevent Overlapping Da...
Power Apps
Unanswered

Prevent Overlapping Dates In Model Driven App Form

(0) ShareShare
ReportReport
Posted on by

Hello All,
I have a Dataverse table where I store information about people being scheduled for certain tasks. To keep it simple let's assume that every record consists of three fields:
1. Barcode

2. Start Date

3.End date

Is there any way prevent a user from submitting a form if they would like to submit a record with overlapping dates? For example an existing record would be:
{Barcode: 123, "Start Date":"2023-03-01T00:00:00Z", "End Date":"2023-03-31T00:00:00Z"}
and someone would like to insert the following:
{Barcode: 123, "Start Date":"2023-03-02T00:00:00Z", "End Date":"2023-03-15T00:00:00Z"}
There is clearly a time conflict between these two and therefore I would like to prevent someone from adding it and if possible notifying him/her about it.
I would like to mention that I was able to achieve it in a canvas app using a "Display Mode" property of a button which is responsible for canvas app form submitting. 
Thank you all in advance!

Canvas App FormCanvas App FormModel Driven FormModel Driven Form

I have the same question (0)
  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    the correct way will be to add a server side check. Ideally with a plugin, the benefit will be that also inside your canvas app the record will fail to save because it will trigger a server side error.

  • NPrice99 Profile Picture
    1,302 on at

    What about if Plugins are not allowed in my environment ?

  • Guido Preite Profile Picture
    1,488 Super User 2024 Season 1 on at

    plugins are always allowed inside an environment.

    If your company has a policy like "no pro-code allowed" to don't have these kind of customizations that is another matter.

    However in your specific scenario the check needs to be synchronous (to don't the save if a date collides) Power Automate (as an example of another way to check if there are overlaps) is not useful in this scenario because it is asynchronous (so the record will be saved in the first place)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard