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

Refresh a gallery that displays my outlook calendar

I have a screen with a Gallery that displays my Outlook 365 Calendar. Items for the Gallery is set as Office365Outlook.CalendarGetItems(ddCalName.Selected.Name).value. This returns my calendar data. The problem is that I can't get to refresh when I add new items to the calendar without closing out and reopening the app. Help!

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Aimthedame 

Unfortunately, there is no particular way to refresh/reset the information when it is tied to the Gallery items directly.

However, you can force it to refresh by changing the calendar name.  You can change your Items property to the following formula:

Office365Outlook.CalendarGetItems(If(lclUpdateCalendar, "", ddCalName.Selected.Name)).value

Then, at some action - a button OnSelect, a Timer action, anything...you can put the following formula:

UpdateContext({lclUpdateCalendar:true}); UpdateContext({lclUpdateCalendar:false})

This will cause the Item formula to reevaluate and it will force a refresh.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

3 REPLIES 3
RandyHayes
Super User III
Super User III

@Aimthedame 

Unfortunately, there is no particular way to refresh/reset the information when it is tied to the Gallery items directly.

However, you can force it to refresh by changing the calendar name.  You can change your Items property to the following formula:

Office365Outlook.CalendarGetItems(If(lclUpdateCalendar, "", ddCalName.Selected.Name)).value

Then, at some action - a button OnSelect, a Timer action, anything...you can put the following formula:

UpdateContext({lclUpdateCalendar:true}); UpdateContext({lclUpdateCalendar:false})

This will cause the Item formula to reevaluate and it will force a refresh.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

I've been trying to figure that out for a week. Thank you so much!

@Aimthedame 

Excellent!  If this helped out then please mark the reply as the solution so that others who experience that same issue can find the answer quickly. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

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