cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
monikaprakash_1
Frequent Visitor

image control not updating frequently with a share point link

Hi

 

I  want to display user profile photo in my app. I saved my photo in SharePoint. And added the share point link in my imageControl.image. And user can updated the image also.. But after updating the image, the image control is not replacing the old image with new image. After refreshing the page, image is displaying correctly. I want to display the image at the time of updation.

I am using flow for saving image

Attaching my code

 

image1.PNG

 

code in image control. image

 

If(!wait,
uplodedImage
)

 

My upload button

Set(
wait,
true
);
Set(
uplodedImage,
"https://*******/test/" &UserId & "/" & UserName & "_" & UserId
);
Set(
wait,
false
);

 

How can I refresh my imagecontrol ?

How can I solve this

 

5 REPLIES 5
Ewtm
Frequent Visitor

Hi,

 

Maybe you can refresh the datasource to update the image in PowerApps? 

Refresh(datasource)

 

If the image updates are frequent you can also add the refresh function to a Timer.

I checked with refresh and timer also.. but both are not working.

 

I am saving my image in SharePoint.. The SharePoint image link is always same but image control is not updating with the latest image.. it always showing the old image. after refresh the application it showing the latest image.

Ewtm
Frequent Visitor

I don't think it is possible to refresh the browser window (application) from within powerapps.

Have you tried saving the newly uploaded photo with a new name (and so changing the url)? So that powerapps is not able to use the photo in the buffer. I think when the name of the image changes, powerapps will always reload the image.

No its not updating in image. I created new link but not updating

MsPowerUser
New Member

Hi 

I was facing the same issue. I find a working solution, and it's easy to adopt.  
Where you would like to display the image within the app and use the variable/link/ etc then concatenate the link with  &"?refresh="&RandBetween(1;1000000) 

Example:
ThisItem.Link&"?refresh="&RandBetween(1;1000000)

I hope I can help. 🙂 

Helpful resources

Announcements
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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,539)