web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Retrieve calendar even...
Power Apps
Answered

Retrieve calendar event using timer

(0) ShareShare
ReportReport
Posted on by 248

Hello,

actually i was trying to add calendar screen template, and then i want to retrieve my calendar event using timer so i don't have to click a dropdown for example to retrieve it, how to do that? 

test11.PNG

 

 

 

 

 

 

 

 

 

 

 

 

Thank you

Categories:
  • Verified answer
    K-A-R-L Profile Picture
    715 on at

    Hi @AdhamFH ,

     

    On your Timer set the,

    AutoStart() Property to:

    true

     

    OnTimerEnd() Property to: 

    If(IsBlank(_userDomain), 
    	UpdateContext({_showLoading: true}); 
    	Set(_userDomain, Right(User().Email, Len(User().Email) - Find("@", User().Email))); 
    	Set(_dateSelected, Today()); 
    	Set(_firstDayOfMonth, DateAdd(Today(), 1 - Day(Today()), Days)); 
    	Set(_firstDayInView, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days)); 
    	Set(_lastDayOfMonth, DateAdd(DateAdd(_firstDayOfMonth, 1, Months), -1, Days)) 
    ); 
    Set(_calendarVisible, false); 
    UpdateContext({_showLoading: true}); 
     
    Set(_minDate, DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days)); 
    Set(_maxDate, DateAdd(DateAdd(_firstDayOfMonth, -(Weekday(_firstDayOfMonth) - 2 + 1), Days), 40, Days)); 
    ClearCollect(MyCalendarEvents, Office365Outlook.GetEventsCalendarViewV2(dropdownCalendarSelection.SelectedText.DisplayName, Text(_minDate, UTC), Text(_maxDate, UTC)).value); //dropdownCalendarSelection is the name of the dropdown field
    UpdateContext({_showLoading: false}); 
    Set(_calendarVisible, true)

     

    Set your Timer duration() Property to: 

    5000 //as a test

     

    Timer Calendar.gif

     

    ----------------------------------------------------------------------------
    Thanks,
    K-A-R-L


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    If you thought this post was helpful, please give it a Thumbs Up.

  • AdhamFH Profile Picture
    248 on at

    @K-A-R-L Thank you for your reply, it solved 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard