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

Sending outlook calendar invite using PowerApps

Hi all you PowerApps gurus

 

I am trying to build a PowerApps which sends Outlook calendar invites to multiple requires attendees. I have watched Shane Young's excellent videos and my app works well as far as putting the appointment in my calendar. But when I select the required attendees from a combox, instead of their emails, I get builtinicon:Mail and outlook reports that the recipient doesn't exist (naturally!) y combo box gets it's feed from a people column in SP list. Mu code is requiredAttendees:Concat(selectAttendee.SelectedItems, Mail , ";"),  where selectAttendee is the combo box name. The same code works perfectly in Shane's  video. Why does it not work for me?  

12 REPLIES 12
StalinPonnusamy
Community Champion
Community Champion

Hi @Siamak 

 

Here is the code using t create Calendar invite

 

Office365Outlook.V4CalendarPostItem(
    "Calendar",
    "Stalin Test",
    DateAdd(
        DateTimeValue(DatePicker3.SelectedDate & " 8:00:00 AM"),
        TimeZoneOffset(),
        Minutes
    ),
    DateAdd(
        DateTimeValue(DatePicker4.SelectedDate & " 8:30:00 AM"),
        TimeZoneOffset(),
        Minutes
    ),
    "(UTC) Coordinated Universal Time",
    {body: "Meeting Notes",requiredAttendees: Concat(RequiredAttendessCombo.SelectedItems.Mail, Text(Mail) & ";")}
)

 

StalinPonnusamy_0-1633211708490.png

 

StalinPonnusamy
Community Champion
Community Champion

Hi @Siamak 

 

The issue is how we select mail id

requiredAttendees: Concat(selectAttendee.SelectedItems.Mail, Mail & ";")

 

StalinPonnusamy
Community Champion
Community Champion

Hi @Siamak 

 

Please refer to Create Calendar Invite blog if any questions regarding this post.

 

Thanks,
Stalin

My blog posts

Many thanks @StalinPonnusamy for your quick reply and advice. The problem is that

RequiredAttendessCombo.SelectedItems.

 does not accept Mail as an identifier. When I add a . after SelectedItems the only valid option it gives me is Result. If I add Mail instead, it gives me an error

StalinPonnusamy
Community Champion
Community Champion

Hi @Siamak 

 

Thanks for the info. Will find the issue. No issues.

 

The source I'm using is Office 365 users. So Items property of my ComboBox Required Attendees is

Office365Users.SearchUser({searchTerm: ""})

 

If your Combobox items property is People/Person Column from SP then

Items property of Combobox will be

Choices([@SPList].ColumnName)

Get the emails id's from the Person Combobox

Concat(
            selectAttendee.SelectedItems.Email,
            Email & ";"
        )

 

Note: If you get builtinicon:Mail means, not accessing right property

 

Concat(selectAttendee.SelectedItems.Email,Mail&";") Change to Concat(selectAttendee.SelectedItems.Email,Email&";")

 

If this information does not help you, Let me know the data source that you are using and your Items' property.

 

 

Thanks for the extra explanation. I'll try this and let you know the result

Ok @StalinPonnusamy I have had a few hours of frustration with this. I used the following Choices option as you suggested: 

 

Choices([@'Edu-helpdesk-job-cats'].AllocateTo) 

 

but  it doesn't list anything (gives me no drop-down at all.) You can see the source SP list and column in the code above 

 

My original code for the combo box was:

 

Item:  Distinct('Edu-helpdesk-job-cats'.AllocateTo,AllocateTo.DisplayName)

 

 which works and gives me the correct drop down list of people.

 

However the code below works but does not produce the correct recipient and instead tries to send the email to builtinicon:Mail

 

requiredAttendees: Concat(
            selectAttendee.SelectedItems,
            Mail & ";"
        ),

 

 

When I add a . after SelectedItems the only option I get is "Result"

 

 

 

StalinPonnusamy
Community Champion
Community Champion

Hi @Siamak

 

I see the issue now. Items Property is Correct but needs to set the Primary text and Searchfield for that Combobox

Choices([@'Edu-helpdesk-job-cats'].AllocateTo) 
  •  Select the Combobox
  • Click "Edit" on the right-side properties
  • Set Primary text and Searchfield as "DisplayName"

StalinPonnusamy_0-1633304823156.png

Then get the email id's like

requiredAttendees: Concat(selectAttendee.SelectedItems.Email, Email & ";")

 

 

Thanks @StalinPonnusamy . On first go, it still didn't work. I will have another go when I get a chance and am less busy.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,592)