ExecuteSQL() or custom function take too long (or infinit) some time.
It would be nice to limit max execution time of calculation while developing.
If you have to advanced SQL-questions you should reconsider doing another solution directly in FileMaker with relationships or ask FMS to run the SQL-question for you.
Thanks for comment.
This is used for development / debugging, so that check the SQL is usable in real case. I should force quit FM many times testing (not really) complex SQL.
So it can be another function something like
EvaluationTimeOut ( expression ; milliseconds )
This request unfortunately makes sense, at least when debugging. It would be best if this could be an optional parameter, though that may be tricky with the existing syntax. A somewhat ugly but simple solution could be to add a new function with the timeout as a required parameter and keep ExecuteSQL as is.
I also get into that problems time to time. Quiting FMP is a pain having to start everything over again. I think you have a good point there, why not add a optional parameter for TimeLimit in seconds. Rewrite your suggestions directly
One could also take a more generic approach, and add a feature that allows for setting a timeout for the evaluation of any formula, not just ExecuteSQL. Perhaps a wrapper formula EvaluateFormula ( Formula ; TimeoutInSeconds ), or a function SetEvaluationTimeout ( TimeoutInSeconds ) that would apply until set again. I'm not quite sure if this should be a script step or a calculation function.
I think the method would have to be chosen depending on how complicated it is to implement, and whether it would have any impact on performance.
I thought of clearness of the parameter should be integer (not in pause script step), but seconds may be enough for this.
I recalled there is only one parameter in EvaluationError(), so second parameter can be timeout in this function, adding error code for "calculation timed out".
Retrieving data ...