cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Delay in data loading while using fetchxml in PowerApps Portal

Hello,

I am storing the form data into CDS using Post method API by PowerApps portal and then retrieving it into another Web Page  using FetchXML method.
But while retrieving the added data, there is sometimes delay of 5-10 minutes which varies and is not definite.

When I check for the data in CDS after adding it is reflected immediately but while fetching the data in web page, it is taking time.

I would really appreciate the help.
Thankyou.

7 REPLIES 7
OliverRodrigues
Super User
Super User

hi, this is not expected.. a few questions for troubleshooting:

  • are you retrieving via FetchXML and then performing a custom render on the page? if you keep the page with only the fetch, but remove any rendering.. is this any faster? 
  • by any chance would you have any plug-ins on the Retrieve Multiple for that entity?
  • If you load the records via Advanced Find (in the Model-Driven App).. do you have any issues there?
  • are there any joins in your Fetch?
  • what are the permissions around that entity?
  • how many records do you have in the entity?



If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

hershal1999
Resolver I
Resolver I

It looks like you are using a custom table to store the form data. So I think this might be because Portal Cache is not getting invalidated when you are retrieving the data using FetchXML. This can be possibly resolved in the following two ways depending upon your implementation

  1. Enable "Change Tracking" on the entity level. 
  2. If you don't want to cache FetchXML results you can add the DateTime condition which will update the condition every time you execute the FetchXML  eg: <condition attribute="createdon" operator="lt" value="{{now}}" />

 

Anonymous
Not applicable

Hi, Please find the required details below-

  • Yes, I am retrieving via FetchXML and then performing a custom render to show in a jQuery Data-table. But even if I keep the page with only the fetch and remove custom rendering, there is still delay in data loading.
  • I am working on a Blank portal and did not check it in the model-driven app.
  • There are no joins in fetch but some conditions applied on the attributes like 'eq' and 'ne'
  • Authorised and Authenticated users have permission to access the entity
  • This issue is with all my entities and not just a particular one. Every entity is loading data with delay.
    Some entities have 50-100 records while some have more than 500.
OliverRodrigues
Super User
Super User

That seems like a very low volume and it shouldn't cause this issue, can you check on the Model-Driven App to see if it loads fine there?

I think you will need to open a support ticket with Microsoft so they can investigate what's wrong with your environment

 

In addition, just FYI, the Tracking Changes checkbox is no longer applicable for cache invalidation, they are only used for configuration entities (adx_) @Anonymous  @hershal1999 




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

@OliverRodrigues Good to know that change tracking is not being used. Do you if Microsoft has any documentation so that I can refer and Mos importantly I can direct others so that they have the it as well?

OliverRodrigues
Super User
Super User

this is the last article from Microsoft about Caching that I have seen: https://powerapps.microsoft.com/en-us/blog/caching-changes-for-power-apps-portals-with-version-9-2-6...

however it's not explicitly saying about the tracking changes




If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Power Pages Super User | MVP


Oliver Rodrigues


 

eugenevanstaden
Resolver III
Resolver III

@Anonymous 

If you are using FetchXml in a liquid template then suggest you break the cache by adding the following condition:

 

 

<filter type="and">
<condition attribute="createdon" operator="le" value='{{ now | date_add_days: 1 | date: "yyyy-MM-dd HH:mm:ss" }}' />
</filter>

 






Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Users online (3,325)