cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
whabicht
Level: Powered On

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
WarrenBelz
Level 8

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
WarrenBelz
Level 8

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

whabicht
Level: Powered On

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

Thank you @WarrenBelz !

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,320)