I’ve created a tabular form and applying a filter in code:
SETRANGE(“Document No.”, MyVariableWithDocumentNo);
It works normal, but only if there is data afters SETRANGE operation.
SETRANGE(“Document No.”, 5) returns many rows and NO PROBLEM.
SETRANGE(“Document No.”, 6) returns zero rows and raises an error.
I need to show an empty form to the user, if SETRANGE returns zero rows. How can I avoid error message?