DataSource not updating if API call returns empty set.
Posted: Mon May 13, 2019 6:17 pm
I have a call I'm making to my API that returns a set of objects to map to the report.
Path to JSON data looks like this:
/api/report?company={Company}&end_date={end_date}
When I update the date, and there is data to be returned, everything is fine and the report updates.
If I pass a date that has no data in the database, I return an empty array to the JSON data source, however the report does not update, it will continue to show the old data from the last successful API call (one that returned data).
How can I ensure my report refreshes when receiving an empty set?
Cheers,
Stan
Path to JSON data looks like this:
/api/report?company={Company}&end_date={end_date}
When I update the date, and there is data to be returned, everything is fine and the report updates.
If I pass a date that has no data in the database, I return an empty array to the JSON data source, however the report does not update, it will continue to show the old data from the last successful API call (one that returned data).
How can I ensure my report refreshes when receiving an empty set?
Cheers,
Stan