Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
mplreport:add_a_query [2024/12/19 02:55]
optrix
mplreport:add_a_query [2025/04/24 05:10] (current)
optrix
Line 14: Line 14:
  
 //NOTE: If you're following along with your own ARDI databases, we suggest substituting 'Temperature' for a value that exists in your ARDI system.// //NOTE: If you're following along with your own ARDI databases, we suggest substituting 'Temperature' for a value that exists in your ARDI system.//
 +
 +===Checking for Errors===
 +
 +You can check to see if there were any issues access data using [[FetchFailure|report.FetchFailure]] function. This returns //True// if there was some kind of issue access your data, or //False// if there were no problems.
 +
 +You can reset this with flag with [[ClearFailures|report.ClearFailures]], or access a list of the errors with [[errors|report.errors]].
 +
 +If there is no way to gracefully handle an issue - such as failure to read data - you can call [[Failed|report.Failed]] to generate a placeholder report advising users of the failure. This will also trigger failure handing inside the ARDI reporting system.
 +
 +<code>
 +   thedata = report.FetchHistory("'Temperature' PROPERTYEX ALLPOINTS")
 +
 +   if report.FetchFailure():
 +      report.Failed("\n".join(report.errors))
 +</code>
 +
 +===The Next Step===
  
 Next, we'd like to [[using historical data|use our historical data]] in our report. Next, we'd like to [[using historical data|use our historical data]] in our report.