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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / restricting duplicate ...
Power Apps
Answered

restricting duplicate dates in multiple datepickers

(0) ShareShare
ReportReport
Posted on by 32

Hi all - I have built a powerapp to allow users to submit schedule preferences. One section is to submit multiple requests for days off. There are 10 date pickers there for them to put in one date per date picker. Not all 10 fields are required. Is there a way to catch if they put duplicate dates in the field and prevent them from hitting a button that navigates them to the next screen?

 

I use this for a different section that has dropdowns: (code is in the OnSelect property of the button) 

With({temp:[DataCardValue39.Selected.Value,DataCardValue40.Selected.Value,DataCardValue41.Selected.Value,DataCardValue42.Selected.Value]},

If(CountRows(temp)<>CountRows(Distinct(temp,Value)),DisplayMode.Disabled & Notify("You have selected duplicate SIM start times, please select only one of each to continue.",NotificationType.Error),

 

The issue with recreating this, is if the user does not select a date in more than one of the datepickers it will catch blank date pickers and say they are duplicates... 

 

Any help/guidance would be appreciated!! Thanks!

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @aking11 ,

     

    Please try:

     

    With({temp:
    Filter([DataCardValue39.Selected.Value,DataCardValue40.Selected.Value,DataCardValue41.Selected.Value,DataCardValue42.Selected.Value],!IsBlank(Value))},

    If(CountRows(temp)<>CountRows(Distinct(temp,Value)),DisplayMode.Disabled & Notify("You have selected duplicate SIM start times, please select only one of each to continue.",NotificationType.Error),

     

     

    Best Regards,

    Bof

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard