How to create a cascade delete master-details form?

Last Update: April 22, 2018

Here are the steps on how to create a master-details form using SPARK Forms and how to enforce the relationship when deleting an item from the master form so all related items will be deleted automatically from the detailed list. We are assuming that you already have the following lists created at the root level:

  1. Countries with the following columns:
    • Country Name: Single line of text.
  2. States with the following columns:
    • State Name: Single line of text.
    • Master ID: Lookup. Check the "Check Enforce relationship behavior" and select "Cascade delete". This is the Master ID column to be mapped with an ID system column in the parent list "Countries".
      How to create a cascade delete master details form1.jpg

 

  1. Open the form in design mode.
  2. Add the following to the form design workspace:
    How to create a cascade delete master details form2.jpg
  3. Set the Required property of txtCountryName and txtStateName controls to ON.
  4. Select Repeater1.
  5. Under Control Properties, set the following:
    • Data Source: Mapped.
    • Mapped To: List.
    • Select the Dynamic Data Source icon to configure the repeater
      How to create a cascade delete master details form4.jpg
  6. Configure Repeater1 as follows:
    How to create a cascade delete master details form5.jpg
  7. Publish the form by clicking on the Publish button in Publishing Group in the Form Ribbon.
  8. Test the form by clicking on an existing item or new item in the Countries list.