cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Cached data showing in fields until refreshed

Hi,

 

I have an issue with cached data appearing in view/edit forms when navigating from the gallery. The form does refresh and show the correct data but, depending on the current connection speed, this can be a few second after loading. It seems to be the attachments within the form that are the problem, the other data looks to refresh pretty much instantly.

 

This is obviously a bit of a concern from a data integrity/security point of view, so I would be grateful if anyone could advise on any workarounds. I've tried ResetForm() but that doesn't seem to have any effect.

 

The underlying data source is a SharePoint list if that makes any difference. I am also using a variable to set the item property on the form ( Set(item,ThisItem) ), because when I was previously using TemplateGalleryList1.Selected I got an error ("Invalid formula. Expected a value compatible with 'DataSource'.").

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: Cached data showing in fields until refreshed

I actually just figured this out when working on another issue I was having (seem to be having a lot these days!).

 

If I clear the variable when loading the gallery, the issue is resolved - i.e. on the OnVisible property:

 

Set(item,Blank());

 

So it's not a case of the data being cache as such, more that the variable doesn't get updated quick enough and the navigation action happens first. Cleaing the variable each time means that regardless of which action gets executed first, there is no danger of a different item being displayed initially. 

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Cached data showing in fields until refreshed

Hi @cattre ,

Could you please share a bit more about your issue?

Do you mean that the attachments could not be refreshed instantly within your Edit form?

Further, could you please show more details about the formula you typed within the Items property of the TemplateGalleryList1?

 

Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please consider take a try with the following workaround:

Set the OnSelect property of the ">" icon within your TemplateGalleryList1 to following formula:

Set(CurrentItemID, ThisItem.ID)

Within Edit form or Display Form, set the Item property to following:

LookUp('SP List', ID = CurrentItemID)

Note: I assume that the TemplateGalleryList1 and the Edit form connect to your same SP List data source.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Resolver I
Resolver I

Re: Cached data showing in fields until refreshed

@v-xida-msft thanks for your reply.

 

Attachments seem to be slower than the other data but the issue affects the whole form - all fields are shown with the previously viewed data initially before the correct data is displayed. It's much more obvious on slower connections so probably easier to replicate if you throttle your browser settings.

 

The TemplateGalleryList1 Items property has lots of filters and is currently pointing at a collection rather than the data source itself (to avoid delegation issues). However, I have just changed this back to the data source (i.e. 'SP List') and the issue still occurs.

 

I changed the OnSelect and Item property as you suggested but this doesn't make a difference. 

Highlighted
Resolver I
Resolver I

Re: Cached data showing in fields until refreshed

I actually just figured this out when working on another issue I was having (seem to be having a lot these days!).

 

If I clear the variable when loading the gallery, the issue is resolved - i.e. on the OnVisible property:

 

Set(item,Blank());

 

So it's not a case of the data being cache as such, more that the variable doesn't get updated quick enough and the navigation action happens first. Cleaing the variable each time means that regardless of which action gets executed first, there is no danger of a different item being displayed initially. 

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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