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

Meeting Capture FollowupTimesScreen: 2 date pickers to select Start and End

I'd like to search for Follow-up meeting times using a range (rather than a day at a time). This would enable my team to search for possible meeting dates over the next month, for example.

I'm thinking two date pickers, but I'm really struggling to get it right. 

Something that could look like this:
Ideal Setup.png

 

Here's the code options to adjust:

OnStart

 

Concurrent(Set(MyCalendarID,LookUp(Office365.CalendarGetTables().value,DisplayName=LookUp(CalendarLocalizedLabel,Value=DisplayName).Value).Name);ClearCollect(AllFutureEvents,Office365.GetEventsCalendarView(MyCalendarID,Text(Today(),UTC),Text(DateAdd(Today(),2,Days),UTC)).Values),Set(MyUserProfile,Office365Users.MyProfile().Id),

    /*used to determine if meeting attendees are in app user's org*/
Set(MyDomain,Last(Split(User().Email,"@")).Result),

    /*used to determine countdown to end of selected meeting*/
Set(HomeTimerStart,Now()));

/*Meetings are defined to be calendar events less than 6 hours in length*/
ClearCollect(MeetingsOnly,Filter(AddColumns(AllFutureEvents,"isCurrent",DateDiff(Start,Now(),Seconds)>0&&DateDiff(Now(),End,Seconds)>0),DateDiff(Start,End,Hours)<6));Set(NumberOfCurrentMeetings,CountRows(Filter(MeetingsOnly,isCurrent)));

/*If a single meeting is happening now, autoselect it*/
If(NumberOfCurrentMeetings=1,Set(AutoSelectMeeting, true );Set(SelectedMeeting,LookUp(MeetingsOnly,isCurrent)))

 

 

FollowUpTimesScreen --> Button ('Find Available Times')

 

ClearCollect(MeetingTimes,AddColumns(
Office365.FindMeetingTimes(
{
MaxCandidates:15,MinimumAttendeePercentage: 1, 
MeetingDuration: MeetingDurationSelection.SelectedText.Minutes,
Start:Text(DateAdd(DatePicker1.SelectedDate,MeetingStartRange.SelectedText.Minutes, Minutes), UTC),
End:Text(DateAdd(DatePicker1.SelectedDate, MeetingEndRange.SelectedText.Minutes, Minutes), UTC),
RequiredAttendees:Concat(FollowUpMeetingAttendees,UserPrincipalName & ";")
}
)
.MeetingTimeSuggestions,"StartTime",MeetingTimeSlot.Start.DateTime,
"EndTime",MeetingTimeSlot.End.DateTime));
Set(ShowMeetingTimes, true);
Set(Loading, false)

 

 

Gallery

 

SortByColumns(MeetingTimes,"Confidence",Descending,"StartTime",Ascending)

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @whabicht ,

Is the solution I provided above helpful in your scenario?

 

If the solution I provided above could solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

If you want to get more Meeting Options using your Office365Outlook.FindMeetingTimes() function, please check and see if my response within the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Schedule-Meeting-How-to-retrieve-complete-Me...

 

On your side, you should modify your formula as below:

Set(Loading, true);
ClearCollect(
             MeetingTimes,
             AddColumns(
                 Office365.FindMeetingTimes({
                                           MaxCandidates: 48,  // modify formula here
                                           MinimumAttendeePercentage: 1, 
                                           MeetingDuration: MeetingDurationSelection.SelectedText.Minutes,
        Start: Text(DateAdd(StartDatePicker.SelectedDate, MeetingStartRange.SelectedText.Minutes, Minutes), UTC), // Modify formula here
        End: Text(DateAdd(EndDatePicker.SelectedDate, MeetingEndRange.SelectedText.Minutes, Minutes), UTC),   // Modify formula here
                         RequiredAttendees:Concat(FollowUpMeetingAttendees,UserPrincipalName & ";"),
                         ActivityDomain: "Unrestricted", // add formula here
                         IsOrganizerOptional: false    // add formula here
             }).MeetingTimeSuggestions,
                         "StartTime", MeetingTimeSlot.Start.DateTime,    
                         "EndTime", MeetingTimeSlot.End.DateTime        
            )
);
Set(ShowMeetingTimes, true);
Set(Loading, false)

Please take a try with above formula, then re-click the "Find Available Times" button again, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @whabicht ,

Could you please share a bit more about your scenario?

Do you want to filter meeting time records using Date time range which across different dates rather than within one day?

 

I have made a test on my side, please consider take a try with the following workaround:

Within your FollowUpTimesScreen, set the OnSelect property of the "Find Available Times" button to following:

Set(Loading, true);
ClearCollect(
             MeetingTimes,
             AddColumns(
                 Office365.FindMeetingTimes({
                                           MaxCandidates:15,
                                           MinimumAttendeePercentage: 1, 
                                           MeetingDuration: MeetingDurationSelection.SelectedText.Minutes,
        Start: Text(DateAdd(StartDatePicker.SelectedDate, MeetingStartRange.SelectedText.Minutes, Minutes), UTC), // Modify formula here
        End: Text(DateAdd(EndDatePicker.SelectedDate, MeetingEndRange.SelectedText.Minutes, Minutes), UTC),   // Modify formula here
                         RequiredAttendees:Concat(FollowUpMeetingAttendees,UserPrincipalName & ";")}).MeetingTimeSuggestions,
                         "StartTime", MeetingTimeSlot.Start.DateTime,
                         "EndTime", MeetingTimeSlot.End.DateTime
            )
);
Set(ShowMeetingTimes, true);
Set(Loading, false)

Note: Please replace the StartDatePicker and EndDatePicker with actual DatePicker names in your FollowUpTimesScreen.

 

After that, please re-load your app, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-xida-msft . It's working like a charm. The last issue I could use help with is figuring out how to display more than 15 meeting options in the gallery. Do you have any idea how I might accomplish that?
You have been super helpful. I appreciate it.

Hi @whabicht ,

Is the solution I provided above helpful in your scenario?

 

If the solution I provided above could solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

If you want to get more Meeting Options using your Office365Outlook.FindMeetingTimes() function, please check and see if my response within the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Schedule-Meeting-How-to-retrieve-complete-Me...

 

On your side, you should modify your formula as below:

Set(Loading, true);
ClearCollect(
             MeetingTimes,
             AddColumns(
                 Office365.FindMeetingTimes({
                                           MaxCandidates: 48,  // modify formula here
                                           MinimumAttendeePercentage: 1, 
                                           MeetingDuration: MeetingDurationSelection.SelectedText.Minutes,
        Start: Text(DateAdd(StartDatePicker.SelectedDate, MeetingStartRange.SelectedText.Minutes, Minutes), UTC), // Modify formula here
        End: Text(DateAdd(EndDatePicker.SelectedDate, MeetingEndRange.SelectedText.Minutes, Minutes), UTC),   // Modify formula here
                         RequiredAttendees:Concat(FollowUpMeetingAttendees,UserPrincipalName & ";"),
                         ActivityDomain: "Unrestricted", // add formula here
                         IsOrganizerOptional: false    // add formula here
             }).MeetingTimeSuggestions,
                         "StartTime", MeetingTimeSlot.Start.DateTime,    
                         "EndTime", MeetingTimeSlot.End.DateTime        
            )
);
Set(ShowMeetingTimes, true);
Set(Loading, false)

Please take a try with above formula, then re-click the "Find Available Times" button again, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,461)