cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
whabicht
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
WarrenBelz
Super User III
Super User III

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
Super User III
Super User III

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

Thank you @WarrenBelz !

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (24,218)