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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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,505 Super User 2026 Season 1 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
11manish Profile Picture

11manish 50

#2
Valantis Profile Picture

Valantis 26

#3
omkarsupreme Profile Picture

omkarsupreme 24

Last 30 days Overall leaderboard