cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

Image in Gallery only resets when screen reloads

Hello. I am having an issue with the image control in my gallery not resetting or refreshing, only doing so when the screen is loaded in. So it only resets when you leave the screen and come back.

This is my test app:

Mgodby_2-1613287868633.png

 

When I select the Upload Image button, it uploads the image to my blob storage container, and then creates a record in cds with that image's url containing a shared access key. This works fine and the url works. After this is done, I store all of the urls into a collection:

Mgodby_1-1613287800789.png

The issue though, is how the image works for all urls except for the one I just uploaded. It remains blank despite the url being there. I've tried refreshing the data source that holds the urls before creating the collection, resetting the gallery, and recreating the collection. Even after the collection has been created, I've tried refreshing the data source again, and resetting the gallery again, making gallery invisible then back to visible, and recreating the collection by doing a clear first and then doing a collect. None of it works, the image remains blank while the others are fine.

The only way I've gotten this to work is by navigating to another screen upon finishing the upload, and then coming back and creating the collection in the OnVisible property of the screen. If I do it that way, it works but I don't really like to having to go to another screen just to come back. 

Does anybody know a way to get this to work without having to go to another screen and come back? Thank you.

2 REPLIES 2
RandyHayes
Super User
Super User

@Mgodby 

What happens if you get rid of the collection and just use the datasource collection?

Filter(ImageUrlTests, TICKET_NO=Gallery...<the rest of your filter criteria here>...)

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Unfortunately, it didn't work either. It seems the only way it works is to to navigate to another screen and then return. Upon return I refresh the datasource, clearcollect the collection, and then reset the gallery. But doing those without switching screens doesn't work.

Helpful resources

Announcements
Super User 2 - 2022 Congratulations 768x460.png

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

<
Users online (2,909)