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 🙂
Solved! Go to Solution.
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:
Hope this helps.
Sik
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:
Hope this helps.
Sik
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.
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) ?
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.
User | Count |
---|---|
253 | |
248 | |
82 | |
45 | |
29 |
User | Count |
---|---|
342 | |
260 | |
123 | |
60 | |
58 |