cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
meskola
Frequent Visitor

Outlook events

Hi, I am new to Powerapps. I am having trouble with Outlook events. I'm building an app, where the default screen shows "my" profile, name, title and company. This all works fine. But I would also like to add a gallery which shows my events for the day (Outlook), but I'm struggling with it. I tried to follow  this but no success - I get no errors but the gallery shows nothing. If I insert a new (calendar) screen it works fine, but I want to simplify it by removing basicly everything (calendar, dropdown etc) but the list of events (gallery) from my default Outlook calendar. If someone could explain how to do this, I would appreciate it. And please, keep it simple for me 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @meskola ,

 

There are two Office365 Outlook Actions to get events from a calendar.

Office365Outlook.V4CalendarGetItems action gets all events, but Office365Outlook.GetEventsCalendarViewV3 action gets all events from a certain period of date.

Please try this:

 

Office365Outlook.V4CalendarGetItems(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Calendar").id).value

 

or 

 

Office365Outlook.GetEventsCalendarViewV3(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Calendar").id,DateTimeValue("2020.1.1"),DateTimeValue("2020.3.11")).value

 

Test Result:

Snipaste_2020-03-11_11-39-33.png

Hope this helps.

Sik

View solution in original post

6 REPLIES 6
v-siky-msft
Community Support
Community Support

Hi @meskola ,

 

There are two Office365 Outlook Actions to get events from a calendar.

Office365Outlook.V4CalendarGetItems action gets all events, but Office365Outlook.GetEventsCalendarViewV3 action gets all events from a certain period of date.

Please try this:

 

Office365Outlook.V4CalendarGetItems(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Calendar").id).value

 

or 

 

Office365Outlook.GetEventsCalendarViewV3(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Calendar").id,DateTimeValue("2020.1.1"),DateTimeValue("2020.3.11")).value

 

Test Result:

Snipaste_2020-03-11_11-39-33.png

Hope this helps.

Sik

View solution in original post

Thanks, pretty much what I was looking for! Now I just have to tweak it so it shows only events for "today", but I propably can figure it out. Excellent.

@v-siky-msft 
I am having trouble with gallery start and end times. I would like it to simply show short (hh.mm.) start time and end time of an event, but I must be missing something. Any suggestions? Also, I am unable to get the "today" view of the events. I can get events between certain dates, or even top 3 results etc, but having issues with "today's view".
For start time of the event i am using Text(ThisItem.Start,DateTimeFormat.ShortTime) which doesn't have an effect, and for gallery  I am currently using Office365Outlook.V4CalendarGetItems(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Kalenteri").id,{'$top':3}).value which works, but instead of top 3 events i would like to see events for the day.
Sieppaa.JPG

Hi @meskola 

Since the start and end field are Text type, first convert it to DateTime and then shape the Text.

Try this:

Text(DateTimeValue(ThisItem.start),DateTimeFormat.ShortTime) 

If you want to show today events, you should use the Filter function to filter all events:

Try this:

Filter(Office365Outlook.V4CalendarGetItems(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Calendar").id).value,Today()<DateValue(end)&&DateValue(start)<=Today())

 Sik

@v-siky-msft 
Shorttime works now, thanks for that and also for explaining how it should work. But the filter doesn't seem to work, I get no results even if i created some test events for later today. Am I missing something (again) ?

Sieppaa2.JPG

 




meskola
Frequent Visitor

I was able to tweak it so that events are shown atleast:
Filter(Office365Outlook.V4CalendarGetItems(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Kalenteri").id).value,Today()<=DateValue(end)&&DateValue(start)=Today())

Though now events are descending (from evening to morning) when it should show ascending (from morning to evening). And also timezone is wrong somehow.  My first event in calendar is 8.05, not 7.05 etc. Any workaround? Time on the upper date/time text-label is shown correctly, but the start and end times of events are off by -1 hour.

Sieppaa3.JPG

 






Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,040)