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

About Screen Meeting Template

Hello,

 

im trying to develop an app using meeting screen template, but i have a little problem here, i want to set the time selection to be more flexible i have try to switch from label to textinput but the formula in the icon which is create a meeting still read it as the value before, how to change the selection time in meeting screen template to be more flexible ?

pic1.PNGpic2.PNG

 

 

 

 

 

 

 

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @AdhamFH :

A bit complicated, but it's not difficult to achieve.I've made a test for your reference:

1\remove MeetingDurationSelect1
2\Add a TextInput control(MeetingDurationSelect1)
set it's Default property to

 

30

 

set it's OnChange property to

 

Select(MeetingDateSelect1)

 

set it's DisplayMode property to

 

If(IsEmpty(MyPeople), DisplayMode.Disabled, DisplayMode.Edit)

 

set it's visible property to 

 

_showDetails

 

/*The effect of the above steps is to replace the original dropdown control with a textinput box control of the same name*/

note:Starting from the third step is to replace all ‘MeetingDurationSelect1.selelcted.Minutes’ with ‘Value(MeetingDurationSelect1.Text)

3\Set MeetingDateSelect1's OnSelect property to:

 

Concurrent(
Reset(TextSearchBox1),
Set(_showMeetingTimes, false),
UpdateContext({_loadingMeetingTimes: true}),
Set(_selectedMeetingTime, Blank()),
Set(_selectedRoom, Blank()),
Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
 {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
 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)

 

4\set AddIcon1's OnSelect property to

 

Collect(MyPeople, {DisplayName: TextSearchBox1.Text, UserPrincipalName: TextSearchBox1.Text});
Concurrent(
Reset(TextSearchBox1),
Set(_showMeetingTimes, false),
UpdateContext({_loadMeetingTimes: true}),
Set(_selectedMeetingTime, Blank()),
Set(_selectedRoom, Blank()),
Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
 {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
 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)

 

5\set Title4's OnSelect property to:

 

Concurrent(
Reset(TextSearchBox1),
Set(_selectedUser, ThisItem),
If(Not(ThisItem.UserPrincipalName in MyPeople.UserPrincipalName), 
 Collect(MyPeople, ThisItem); 
 Concurrent(
 Set(_showMeetingTimes, false),
 UpdateContext({_loadMeetingTimes: true}),
 Set(_selectedMeetingTime, Blank()),
 Set(_selectedRoom, Blank()),
 Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
 ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
  {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
  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)
))

 

6\set iconRemove1's OnSelelct property to

 

Remove(MyPeople, LookUp(MyPeople, UserPrincipalName = ThisItem.UserPrincipalName));Concurrent(
Reset(TextSearchBox1),
Set(_showMeetingTimes, false),
UpdateContext({_loadMeetingTimes: true}),
Set(_selectedMeetingTime, Blank()),
Set(_selectedRoom, Blank()),
Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
 {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
 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)

 

7\set Title2's OnSelect property to

 

Set(_selectedMeetingTime, ThisItem);
UpdateContext({_loadingRooms: true});
/*Collects user's tenant room lists (if any)*/
If(IsEmpty(RoomsLists),
 ClearCollect(RoomsLists, Office365Outlook.GetRoomLists().value));
/*If tenant has no room lists, retrieves all the tenant rooms, and then retrieves their availabilities for the selected meeting time*/
If(CountRows(RoomsLists) <= 1,
 Set(_noRoomLists, true);
 ClearCollect(AllRooms, Office365Outlook.GetRooms().value);
 Set(_allRoomsConcat, Concat(FirstN(AllRooms, 20), Address & ";"));
 ClearCollect(RoomTimeSuggestions, Office365Outlook.FindMeetingTimes({RequiredAttendees: _allRoomsConcat, MeetingDuration: Value(MeetingDurationSelect1.Text),
   Start: _selectedMeetingTime.StartTime & "Z", End: _selectedMeetingTime.EndTime & "Z", MinimumAttendeePercentage: "1",
   IsOrganizerOptional: "false", ActivityDomain: "Unrestricted"}).MeetingTimeSuggestions);
 ClearCollect(AvailableRooms, AddColumns(AddColumns(Filter(First(RoomTimeSuggestions).AttendeeAvailability,
   Availability="Free"), "Address", Attendee.EmailAddress.Address), "Name", LookUp(AllRooms, Address = Attendee.EmailAddress.Address).Name));
 ClearCollect(AvailableRoomsOptimal, DropColumns(DropColumns(AvailableRooms, "Availability"), "Attendee")),
 Set(_roomListSelected, false));
UpdateContext({_loadingRooms: false})
8\set Title3's OnSelelct property to
/*If user is viewing room lists, then retrieves the availabilities for the rooms within that list during the selected meeting time
If user is viewing rooms, selects that room*/               
UpdateContext({_loadingRooms: true});                   
If(!_roomListSelected && !_noRoomLists,                   
 Set(_roomListSelected, true);                   
 Set(_selectedRoomList, ThisItem.Name);                   
 ClearCollect(AllRooms, Office365Outlook.GetRoomsInRoomList(ThisItem.Address).value);                   
 Set(_allRoomsConcat, Concat(FirstN(AllRooms, 20), Address & ";"));                   
 ClearCollect(RoomTimeSuggestions, Office365Outlook.FindMeetingTimes({RequiredAttendees: _allRoomsConcat, MeetingDuration: Value(MeetingDurationSelect1.Text),                   
   Start: _selectedMeetingTime.StartTime & "Z", End: _selectedMeetingTime.EndTime & "Z", MinimumAttendeePercentage: "1",                   
   IsOrganizerOptional: "false", ActivityDomain: "Unrestricted"}).MeetingTimeSuggestions);                   
 ClearCollect(AvailableRooms, AddColumns(AddColumns(Filter(First(RoomTimeSuggestions).AttendeeAvailability, Availability = "Free"),                   
   "Address", Attendee.EmailAddress.Address), "Name", LookUp(AllRooms, Address = Attendee.EmailAddress.Address).Name));                   
 ClearCollect(AvailableRoomsOptimal, DropColumns(DropColumns(AvailableRooms, "Availability"), "Attendee")),                   
 Set(_selectedRoom, ThisItem)                   
);                   
UpdateContext({_loadingRooms: false})

 

13.gif

Best Regards,

Bof

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @AdhamFH :

A bit complicated, but it's not difficult to achieve.I've made a test for your reference:

1\remove MeetingDurationSelect1
2\Add a TextInput control(MeetingDurationSelect1)
set it's Default property to

 

30

 

set it's OnChange property to

 

Select(MeetingDateSelect1)

 

set it's DisplayMode property to

 

If(IsEmpty(MyPeople), DisplayMode.Disabled, DisplayMode.Edit)

 

set it's visible property to 

 

_showDetails

 

/*The effect of the above steps is to replace the original dropdown control with a textinput box control of the same name*/

note:Starting from the third step is to replace all ‘MeetingDurationSelect1.selelcted.Minutes’ with ‘Value(MeetingDurationSelect1.Text)

3\Set MeetingDateSelect1's OnSelect property to:

 

Concurrent(
Reset(TextSearchBox1),
Set(_showMeetingTimes, false),
UpdateContext({_loadingMeetingTimes: true}),
Set(_selectedMeetingTime, Blank()),
Set(_selectedRoom, Blank()),
Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
 {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
 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)

 

4\set AddIcon1's OnSelect property to

 

Collect(MyPeople, {DisplayName: TextSearchBox1.Text, UserPrincipalName: TextSearchBox1.Text});
Concurrent(
Reset(TextSearchBox1),
Set(_showMeetingTimes, false),
UpdateContext({_loadMeetingTimes: true}),
Set(_selectedMeetingTime, Blank()),
Set(_selectedRoom, Blank()),
Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
 {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
 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)

 

5\set Title4's OnSelect property to:

 

Concurrent(
Reset(TextSearchBox1),
Set(_selectedUser, ThisItem),
If(Not(ThisItem.UserPrincipalName in MyPeople.UserPrincipalName), 
 Collect(MyPeople, ThisItem); 
 Concurrent(
 Set(_showMeetingTimes, false),
 UpdateContext({_loadMeetingTimes: true}),
 Set(_selectedMeetingTime, Blank()),
 Set(_selectedRoom, Blank()),
 Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
 ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
  {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
  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)
))

 

6\set iconRemove1's OnSelelct property to

 

Remove(MyPeople, LookUp(MyPeople, UserPrincipalName = ThisItem.UserPrincipalName));Concurrent(
Reset(TextSearchBox1),
Set(_showMeetingTimes, false),
UpdateContext({_loadMeetingTimes: true}),
Set(_selectedMeetingTime, Blank()),
Set(_selectedRoom, Blank()),
Set(_roomListSelected, false),
/*
Uses Office365 Outlook FindMeetingTimes operation to find available meeting times given various parameters including a semicolon separated list of attendee email addresses,
a meeting duration (in minutes), an acceptable start and end range to find the meeting.
Attendee emails are retrieved from the MyPeople collection. Duration and Start/End are retrieved from their respective dropdowns, where Start is set to 8:00 AM on the date selected, and End is set to 5:00 PM on the date selected.
*/
ClearCollect(MeetingTimes, AddColumns(Office365Outlook.FindMeetingTimes(
 {RequiredAttendees:Concat(MyPeople, UserPrincipalName & ";"), MeetingDuration:Value(MeetingDurationSelect1.Text),
 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)

 

7\set Title2's OnSelect property to

 

Set(_selectedMeetingTime, ThisItem);
UpdateContext({_loadingRooms: true});
/*Collects user's tenant room lists (if any)*/
If(IsEmpty(RoomsLists),
 ClearCollect(RoomsLists, Office365Outlook.GetRoomLists().value));
/*If tenant has no room lists, retrieves all the tenant rooms, and then retrieves their availabilities for the selected meeting time*/
If(CountRows(RoomsLists) <= 1,
 Set(_noRoomLists, true);
 ClearCollect(AllRooms, Office365Outlook.GetRooms().value);
 Set(_allRoomsConcat, Concat(FirstN(AllRooms, 20), Address & ";"));
 ClearCollect(RoomTimeSuggestions, Office365Outlook.FindMeetingTimes({RequiredAttendees: _allRoomsConcat, MeetingDuration: Value(MeetingDurationSelect1.Text),
   Start: _selectedMeetingTime.StartTime & "Z", End: _selectedMeetingTime.EndTime & "Z", MinimumAttendeePercentage: "1",
   IsOrganizerOptional: "false", ActivityDomain: "Unrestricted"}).MeetingTimeSuggestions);
 ClearCollect(AvailableRooms, AddColumns(AddColumns(Filter(First(RoomTimeSuggestions).AttendeeAvailability,
   Availability="Free"), "Address", Attendee.EmailAddress.Address), "Name", LookUp(AllRooms, Address = Attendee.EmailAddress.Address).Name));
 ClearCollect(AvailableRoomsOptimal, DropColumns(DropColumns(AvailableRooms, "Availability"), "Attendee")),
 Set(_roomListSelected, false));
UpdateContext({_loadingRooms: false})
8\set Title3's OnSelelct property to
/*If user is viewing room lists, then retrieves the availabilities for the rooms within that list during the selected meeting time
If user is viewing rooms, selects that room*/               
UpdateContext({_loadingRooms: true});                   
If(!_roomListSelected && !_noRoomLists,                   
 Set(_roomListSelected, true);                   
 Set(_selectedRoomList, ThisItem.Name);                   
 ClearCollect(AllRooms, Office365Outlook.GetRoomsInRoomList(ThisItem.Address).value);                   
 Set(_allRoomsConcat, Concat(FirstN(AllRooms, 20), Address & ";"));                   
 ClearCollect(RoomTimeSuggestions, Office365Outlook.FindMeetingTimes({RequiredAttendees: _allRoomsConcat, MeetingDuration: Value(MeetingDurationSelect1.Text),                   
   Start: _selectedMeetingTime.StartTime & "Z", End: _selectedMeetingTime.EndTime & "Z", MinimumAttendeePercentage: "1",                   
   IsOrganizerOptional: "false", ActivityDomain: "Unrestricted"}).MeetingTimeSuggestions);                   
 ClearCollect(AvailableRooms, AddColumns(AddColumns(Filter(First(RoomTimeSuggestions).AttendeeAvailability, Availability = "Free"),                   
   "Address", Attendee.EmailAddress.Address), "Name", LookUp(AllRooms, Address = Attendee.EmailAddress.Address).Name));                   
 ClearCollect(AvailableRoomsOptimal, DropColumns(DropColumns(AvailableRooms, "Availability"), "Attendee")),                   
 Set(_selectedRoom, ThisItem)                   
);                   
UpdateContext({_loadingRooms: false})

 

13.gif

Best Regards,

Bof

AdhamFH
Helper V
Helper V

hi @v-bofeng-msft , thank you for your reply, i'm trying it but is it possible in meetingdurationselect1 if i put 15 for example ? because i didn't find the difference from 30

v-bofeng-msft
Community Support
Community Support

Hi @AdhamFH :

The minimum time unit time span of Office365Outlook.FindMeetingTimes is 30min, and the part less than 30min cannot be separated independently. For example:

  • If the meeting duration is 45 minutes, it will search for free meeting rooms according to two 30 minutes, which is one hour.
  • If the meeting duration is 15 minutes, it will search for free meeting rooms according to one 30 minutes.

Although filling in 15 and 30 seems to get the same result, in fact the end time of the meeting is different.

14.gif

Best Regards,

Bof

 

AdhamFH
Helper V
Helper V

ooh i see, and then the last one i just want to confirm from your first reply in textinput control at onchange property you put two function so did you mean it would look like this ? @v-bofeng-msft 

Select(MeetingDateSelect1);If(IsEmpty(MyPeople), DisplayMode.Disabled, DisplayMode.Edit)

 

Hi @AdhamFH :

Sorry it's my fault.It should be:

set it's OnChange property to

Select(MeetingDateSelect1)

set it's DisplayMode property to

If(IsEmpty(MyPeople), DisplayMode.Disabled, DisplayMode.Edit)

Best Regards,

Bof

AdhamFH
Helper V
Helper V

okayy i think it is clear enough thank you so much @v-bofeng-msft 

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,954)