cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Responsive Resident
Responsive Resident

Create a Calendar Event (Outlook) and Invite Attendees

Hi all,

I have a PowerApp with a button with a function to create a calendar event. 

All I want to do is invite a single person from a drop down (connected to a SharePoint People Picker to that event. 

The People Picker does not allow multiple values.

 

My formula is: 

    

Office365Outlook.CalendarPostItem("Calendar",EndTimeLabel.Text,StartTimeLabel.Text,MySubjectLabel.Text,{Attendees:ThisItem.BriefingWith.Email})

But I constantly get an error message like: "This formula uses scope which is not presently supported for evaluation." and when I specifically hover over the Attendees section I get "Invalid argument type (Text), expecting Table value instead."

 

Thanks,

 

3 REPLIES 3
AppDeveloper
Helper III
Helper III

Hi @SylvieLet17 

 

Try Selected instead of ThisItem like below

 

Office365Outlook.CalendarPostItem("Calendar",EndTimeLabel.Text,StartTimeLabel.Text,MySubjectLabel.Text,{Attendees:Selected.BriefingWith.Email})

 

Let me know if this works

 

Regards

 

@AppDeveloper  Thanks for this, I get a "Name isn't valid. This identifier isn't recognized" and "Invalid use of '.'

 

Thanks

v-siky-msft
Community Support
Community Support

Hi @SylvieLet17 ,

 

Please note:

1. CalendarPostItem has been deprecated. Please use V4CalendarPostItem instead.

2. Table parameter should be Calendar id,  use combo box to show the calendar table, and set Items: Office365Outlook.CalendarGetTablesV2().value

Snipaste_2019-12-04_18-15-19.png

3. Start time and end time should be date type. you can use DateValue("Text") to format a date.

Snipaste_2019-12-04_18-12-28.png

Please take the following code for reference:

Office365Outlook.V4CalendarPostItem(ComboBox1.Selected.id,"Test1",DateValue("2019/12/4"),DateValue("2019/12/6"),"(UTC) Coordinated Universal Time",{requiredAttendees:ComboBox2.Selected.Email})

Note: Combo box1 is to select calendar, and combo box2 is to select the email of SP person column.

Bes regards,

Sik

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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (20,010)