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 / Pevent Duplicate Entri...
Power Apps
Unanswered

Pevent Duplicate Entries for Mutliple DropDowns and Date Range

(0) ShareShare
ReportReport
Posted on by 3

Hi, 

 

I have been building my first scheduling PowerApp. I have created a Form which updates an excel in OneDrive. 

 

I need the Form to prevent duplicate bookings for an Aircraft and/or Instructor pilot. 

 

The Form collects "Aircraft or Resource" via Dropdown and "Instructor" also via Drop Down. The user then selects a StartDate and EndDate via DatePickers. 

 

How can I make the Form check and prevent an Aircraft and/or Instructor from having the same Date range booked?

 

I've been trying to google this and came close but not close enough to get a working solution.

 

Thanks in advance

Categories:
  • rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @almon1298 

     

    The best way to do this is to allow the user available dates based on the selection and to disallow the already booked to be selected again.  @mdevaney did a great blog on creating a calendar in Power App and even adding events to it - this will give our app a real professional touch. 

     

    A quick way is to request the resources or instructor, start and end date, query the datasource and return the dates available for the selection which allows the user to book available slots.

     

    Hope it helps,

    R

  • almon1298 Profile Picture
    3 on at

    Hi @rubin_boer 

    Thanks for the reply, the second idea there seems exactly what I need. But I have no idea how to execute that. 

    I'm basically just struggling to get my IF statement correctly set out. 

    I have a Dropdown box for "Instructors" and 2 date pickers. The data table has a column "Instructors" and "Start Time" and "Finish Time". 

     

    I'm using a form to capture the bookings which is made up of;

    Database; "Bookings"

    Instructor Dropdown; "DRPInstructors"

    Date Picker 1 "Start Time_DataCard1"

    Date Picker 2 "Finish Time_DataCard1"

    The columns in the database are labelled "Instructor", "Start Time" and "Finish Time".

    Any help on setting this out would be most appreciated.

    Thanks Again

  • jed76 Profile Picture
    on at

    Hi

    I’m trying to do the same and can’t get it to work either for my scheduling app as well! Did you get any further?

     

    I’ve tried COUNTROWS but can’t get the logic correct!

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard