How to cancel On Add Row event?

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.
                  Zoho Marketing Automation


                          Manage your brands on social media



                                  Zoho TeamInbox Resources

                                    Zoho DataPrep Resources



                                      Zoho CRM Plus Resources

                                        Zoho Books Resources


                                          Zoho Subscriptions Resources

                                            Zoho Desk Resources

                                              Zoho Projects Resources


                                                Zoho Sprints Resources


                                                  Qntrl Resources


                                                    Zoho Creator Resources


                                                      Zoho WorkDrive Resources



                                                        Zoho Campaigns Resources

                                                          Zoho CRM Resources

                                                          • CRM Community Learning Series

                                                            CRM Community Learning Series


                                                          • Tips

                                                            Tips


                                                          • Functions

                                                            Functions


                                                          • Meetups

                                                            Meetups


                                                          • Kbase

                                                            Kbase


                                                          • Resources

                                                            Resources


                                                          • Digest

                                                            Digest


                                                          • CRM Marketplace

                                                            CRM Marketplace


                                                          • MVP Corner

                                                            MVP Corner


                                                          • Word of the Day

                                                            Word of the Day

                                                                Design. Discuss. Deliver.

                                                                Create visually engaging stories with Zoho Show.

                                                                Get Started Now