I have an image control in a test app, where the image is derived from a URL, e.g.
Image = ("https://s3-ap-southeast-2.amazonaws.com/api-dev-jupyter-notebook-s3/graph_sales.png")
I am working on a solution that allows that image to be updated (while retaining the same file name). Now in my mind, this should allow the image reference to either
a) automatically update
b) Be able to update via a button click or timer. I've tried a button that sets this image to the same URL again, and a timer where the timer end sets the image controls image property to the same URL again (after the image has been updated). Unfortunately, the image doesn't update. Not unless I quit out of the app and re-launch (or possibly navigate to a different screen and back again, I haven't tested that). Is this simply not possible in PowerApps, or am I missing something? There's no 'refresh' command for an image sadly.
If I can get this to work, then I have a way to dynamically generate some really interesting and cool graphs, and wanted to do a tutorial on it, but without this piece of the puzzle, it's essentially useless.
Solved! Go to Solution.
Hi @JamesM,
It looks like you want to use the same URL, update it, and see a different result. The problem you're encountering is the content from the URL is caching.
So you need a way to tell PowerApps "I have a new version of this same URL."
Here's how I would do it today:
Set(image,AzureBlobStorage.UpdateFile(test.Id,AddMediaButton1.Media));
Set(wait,true); Set(image,AzureBlobStorage.UpdateFile(test.Id,AddMediaButton1.Media)); Set(wait,false)Since the variable is flipping on, then off when the image is updated, we can take advantage of that.
If(!wait, image )
For a moment, the wait variable is true, so there's no image. At that time, the image is being updated. When the image is done updating, wait is returned to false. So the image box will attempt to show the URL again. It should be updated by then.
Let me know if this works for you.
Note: I've attached an msapp file (File > Open > Browse) . It has what I used for testing, but it's tied to Azure Blob.
Anyone have any ideas? I'm super keen to write this tutorial, but it's for naught if I can't solve this part.
Hi @JamesM,
It looks like you want to use the same URL, update it, and see a different result. The problem you're encountering is the content from the URL is caching.
So you need a way to tell PowerApps "I have a new version of this same URL."
Here's how I would do it today:
Set(image,AzureBlobStorage.UpdateFile(test.Id,AddMediaButton1.Media));
Set(wait,true); Set(image,AzureBlobStorage.UpdateFile(test.Id,AddMediaButton1.Media)); Set(wait,false)Since the variable is flipping on, then off when the image is updated, we can take advantage of that.
If(!wait, image )
For a moment, the wait variable is true, so there's no image. At that time, the image is being updated. When the image is done updating, wait is returned to false. So the image box will attempt to show the URL again. It should be updated by then.
Let me know if this works for you.
Note: I've attached an msapp file (File > Open > Browse) . It has what I used for testing, but it's tied to Azure Blob.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
200 | |
52 | |
41 | |
39 | |
35 |
User | Count |
---|---|
261 | |
85 | |
71 | |
69 | |
66 |