I'm trying to get Data from SP List through rest API from SPFX, I've checked by running that rest API directly in the browser where it shows correct data but while making a call from SPFX that rest API gives mismatched data in comparison to what data is present in SP list. But this problem persists only until I clean browser cache and hard reload after that it shows correct data.

Not able to understand the reason behind it on browser rest API works fine but making a list call to fetch the same with that rest API it shows data mismatch.

I'm pasting the rest API URL for the same -

https://contose.sharepoint.com/sites/MySite/Site/_api/web/lists/getByTitle('MyList')/items(252)?$select=*, AmbassadorsRequired/TaskID, AmbassadorsRequired/SignUpCount, AmbassadorsRequired/AmbassadorsRequired, Author/EMail, Author/Name,Assigntaskowner/EMail,Assigntaskowner/Name,Assigntaskowner/Title&$expand=AmbassadorsRequired, Author, Assigntaskowner

The column data which we are fetching is a lookup column stored in another list, I verified both the list had correct data for that column.

Kindly help me on this.

  • Can you share the code used in SPFx web part? Also, what do you mean by "mismatched data"? Is it loading incorrect data from main list ("MyList") or from parent lookup list (for this column: AmbassadorsRequired)? Apr 21 at 7:19
  • Mismatched data I mean in the sense is AmbassadorsRequired column is a lookup column in "MyList" where I'm trying to get the value of SignUpCount which I've written in select query. Main list and parent lookup column has correct data and are in sync this issue is intermittent as soon as I'm clearing cache and do hard reload it fixes the issue. Although this happening to some users only but if it happens to many users it will show wrong data. Apr 21 at 11:14


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.