cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lenro
Helper IV
Helper IV

Refresh data in gallery

Hey guys,

 

As I understand I cannot just use Refresh() function to update my gallery.

Currently I have a following formula in Items to my Gallery:

Office365.CalendarGetItems(CalendarName.Text).value

I would like to update it lets say every 2 minutes, so that I can see the updated version of my meetings

 

As I read I need to collect again. Could someone provide me a solution as I really spend long time on figuring it out.

 

Thanks a lot!

 

1 ACCEPTED SOLUTION

Accepted Solutions
lenro
Helper IV
Helper IV

I found solution myself.

Need to use variable. so create a new gallery, in text write f.e. varGallery

Then create a timer and in the end of it use Set(varGallery,code_which_gallery_used)

And voila it works!

View solution in original post

9 REPLIES 9
mdevaney
Super User
Super User

@lenro 
You could create a Timer with the following properties to Refresh the collection every 2 mins.

Autostart: true
AtTimerEnd: ClearCollect(colCollection, your_code_here)
Duration: 120000
Repeat: true

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thanks for fast reply.

When you say, your code here, which one you mean?

@lenro 

My suggestion is to create a Timer control and put the code I shared in each property.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

That I understood, the problem is, you wrote a part "your_code_here", and I am unsure what I should type in there? I tried dífferent things, and nothing updated gallery

Can you please give an example?

@lenro 

Thank you for clarifying.  Where I wrote your_code_here you should be using whatever code you used to create the collection originally.  It will have the effect of 'refreshing' it once the timer is ended.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."  

I wish it did. When I go to play mode it is showing that something on screen is updating, however f.e. newly created events in my calendar or prolonged meetings are not getting updated.

Any suggestions?

lenro_0-1600279995629.png

 

lenro_1-1600280014756.png

 

@lenro 

Your said your gallery was populated by a collection.  The code you showed me in the screen above not a collection.  Can you please clarify what your datasource is?

A. Collection

B. Something else

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Hmmm now i am very confused.

I am sorry if I pushed you wrong direction as I am a bit lost in naming.

 

So. I used my connection to outlook 365. There I am connected to my calendar. So my gallery is showing what events I have in the calendar.

 

 

 

lenro
Helper IV
Helper IV

I found solution myself.

Need to use variable. so create a new gallery, in text write f.e. varGallery

Then create a timer and in the end of it use Set(varGallery,code_which_gallery_used)

And voila it works!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,740)