web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / FetchXML returning old...
Power Pages
Unanswered

FetchXML returning old data

(0) ShareShare
ReportReport
Posted on by 34

Is there a way for FetchXML to return the most up-to-date data from a table?

I've got a page that runs FetchXML when it loads. It looks at a Dataverse table and returns some specific values (employee number, a choice, department number). The page will display certain things depending on the value of the choice. This is done through liquid. The problem is, the choice can change when the user is on that page. If it does change and the page is reloaded, it's still grabbing the old choice value and not the new one. It shows the change in Dataverse though. It takes 5+ minutes for the FetchXML to get the most recent data.

 

Is this something that can be immediate?

Categories:
I have the same question (0)
  • Verified answer
    Fubar Profile Picture
    8,340 Super User 2025 Season 2 on at

    Your queries will pull data from the Portals Cache which is why you see data where the data has been added/updated in Dataverse and not yet updated in the Cache (which takes a couple of minutes).

    Note: It is not recommended by Microsoft to break the Cache, but you can if you are querying the data yourself (you can't if using a standard view), what you do is add a condition into your fetchxml that includes date-time down to seconds (e.g. createdon is less than or equal to today).  Basically this makes your query a bit more unique (except for another user making the same query in the same second) and so will pull the data from Dataverse.

     

    (I don't have it at hand, but you will find this has been answered with an example in the past)

  • ShaneHubble Profile Picture
    34 on at

    Thanks for the suggestion. Adding 

    <condition attribute='modifiedon' operator='on-or-before' value='{{ 'now' | date:'MM/dd/yyyy HH:mm:ss' }}'/>
    fixed the issue. It now pulls the most recent data for the user.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard