OData error message - We encountered an error while trying to connect
Clear Excel filtering error when new field added to Odata feed
Table of Contents
When a new field has been added to the OData feed, you may get an error with words to the effect “We encountered an error while trying to connect - Details"; ”We couldn't parse OData…."; etc.
This can be caused when new fields are added to the OData feed which you use for creating your own reports, and the Excel cache needs to be cleared down to read the new table schema.
It is more common when accessing larger datasets, and there is a filter in the URL - for example, when selecting Stock Summary data from a certain accounting period.
Example URL - https://unitrade400-YOURSYSTEM.mendixcloud.com/OData/Analysis/StockSummaries?$filter=Period eq ‘202201’
To clear this error, you need to clear your Excel cache.
How to clear your Excel cache
To do this open Excel
- Click on “Data” tab
- then “Get Data” button
- In the menu below, select “Query Options” button
- In the resultant window, under “Global”
- select “Data Load”
- Scroll down the window to “Data cache management options”
- click the “Clear Cache” button
When the process has completed, click “OK” then restart your OData feed, complete with the filter command and all will come through as it should.