cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Two Date Pickers - one for start date and the other for end date

In my job, there is a TON of scheduling w/ some very busy people. I've set-up a PowerApp to search for and book meeting times, but I have to scroll through one day at a time. I could really use a way to search over a span of time (eg: 30 days). It makes sense to me that we'd use two date pickers. But I can't figure out how to configure it so that the meeting time options cover a span of time.

Here's what I currently have:

Current.png

 

Here's what I'd like:
Double Date Picker.png

 

Here's the code to the original:

ClearCollect(MeetingTimes, AddColumns(Office365.FindMeetingTimes(
	{RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:MeetingDurationSelect1.Selected.Minutes,
	Start:Text(DateAdd(MeetingDateSelect1.SelectedDate, 8, Hours), UTC), 
        End:Text(DateAdd(MeetingDateSelect1.SelectedDate, 17, Hours), UTC),
	MaxCandidates:15, MinimumAttendeePercentage:1, IsOrganizerOptional: false, ActivityDomain: "Work"}).MeetingTimeSuggestions,
"StartTime", MeetingTimeSlot.Start.DateTime, "EndTime", MeetingTimeSlot.End.DateTime))
);
UpdateContext({_loadingMeetingTimes: false});
Set(_showMeetingTimes, true)



Any help would be much appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Two Date Pickers - one for start date and the other for end date

Hi @whabicht ,

I will call the DatePickers StartDate and EndDate and the collection you have called MeetingTImes, with the Gallery I will call Meetings and the field Appointment

It is good that it is a collection as you will not get delegation issues on the date query.

So the Items property of Meetings gallery would be

Filter(
   MeetingTimes,
   Appointment >= StartDate.SelectedDate &&
   Appointment <= EndDate.SelectedDate
)

 Happy to help further if required.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Two Date Pickers - one for start date and the other for end date

Hi @whabicht ,

I will call the DatePickers StartDate and EndDate and the collection you have called MeetingTImes, with the Gallery I will call Meetings and the field Appointment

It is good that it is a collection as you will not get delegation issues on the date query.

So the Items property of Meetings gallery would be

Filter(
   MeetingTimes,
   Appointment >= StartDate.SelectedDate &&
   Appointment <= EndDate.SelectedDate
)

 Happy to help further if required.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Helper I
Helper I

Re: Two Date Pickers - one for start date and the other for end date

Thank you @WarrenBelz !

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,879)