Validate a legacy table when saving changes without losing the changes

  • Goal: Validate a legacy table when saving changes.

  • Steps:
    The only way I could think to do this, was to change the "save handler" from query.trigger to "Run Script".

Screenshot 2024-01-23 at 11.49.14

However, I can't figure out how to cancel the save, without losing the changes.

  • Details:

In the save handle, I have tried different methods of exiting, e.g. returning false and throwing an error.

if (if (errors.length > 0) {
  //  throw new Error('Validation failed');
  return false;

However, it removes all the changes without giving the user change to correct the issue.