How to cancel On Add Row event?
Is there a "cancel Add Row" type syntax in the On Add Row subform event that can be fired? My use case is this, I want the screen to send out an Alert saying that some fields are not filled out in the master/main form when the user clicks on the "Add" link in the subform and then remove the new row in the subform.
So in my On Add Row action, I have checked the condition say:
if (input.Field1 == null)
{ alert "Field 1 in the main form needs to be filled out.";
cancel Add Row; <===== Of course this line does not work.
}
So is there an equivalent like cancel submission or cancel delete type syntax for Add Row here?
I have also tried "clear row;" and it didn't work neither.
Any help will be greatly appreciated. Thanks.