Baadal Help - Document

Best Web Development Platform Baadal|Types of Forms

Parent-Child Detail Entry:

The Parent-Child Detail Entry form helps you to perform data manipulation on the selected table pair with controls internally mapping to the Data Grid. In this form one table is considered as a parent table and another one as a child table. Capturing Parent and Child Table information in one form is a common requirement in most of the database applications.

For example, Invoice information will be saved in 2 tables, Invoice Master and Invoice Detail. Invoice master will store Invoice Number, Invoice Date, Total Amount etc and Invoice child table will store multiple product information.

This form will represent all fields of the parent and child tables with different types of controls depending on the field’s datatype. The data is displayed over 2 data grids, in which one grid refers to the parent table while another refers to the child table. Buttons which are having predefined actions like New, Save, Delete, Search, Export, Close for parent table operation, as well as Add, Update, Remove for child table operation are set.


 Best Rapid Application Development Tool Baadal - Form Design UI

Note: Baadal expects users to follow database design guidelines for making applications work.

For example, single primary key for parent table and composite primary key for child table.

Invoice Master

Id int(10) PK

Invoice Detail

Id int(10) PK

Invoice_Id int(10) PK , FK(Invoice Master)

To create a Parent-Child Detail Entry form

Click on New Form button.


 Best Rapid Application Development Tool Baadal - Create Simple Form

Select Form type as Parent-Child Detail Entry.


 Best Rapid Application Development Tool Baadal - Create Simple Form

Select Parent Table Name in the drop-down (Dropdown lists all tables from given database details)


 Best Rapid Application Development Tool Baadal - Create Simple Form

Select the Primary Key Field.


 Best Rapid Application Development Tool Baadal - Create Simple Form

Baadal automatically identifies the Primary Key Field from the table as defined in the database and it sets the primary key. In Baadal Primary key gets auto-incremented if it is of integer data type.


 Best Rapid Application Development Tool Baadal - Create Simple Form

Baadal automatically identifies the Sort field from the table as defined in the database and it sets the primary key. Sort Field can be selected from the Dropdown as shown below.


 Best Rapid Application Development Tool Baadal - Create Simple Form

Select Child Table Name in the drop-down. (Drop-down lists all tables from given database details)


 Best Rapid Application Development Tool Baadal - Create Simple Form

Select the Primary Key Field.


 Best Rapid Application Development Tool Baadal - Create Simple Form

Select the Foreign Key Field (Which is having a relation on parent table)


 Best Rapid Application Development Tool Baadal - Create Simple Form

Select the Sort Key Field.


 Best Rapid Application Development Tool Baadal - Create Simple Form

Check Use Title-Case [Link] to display the Table name in Title case.


 Best Rapid Application Development Tool Baadal - Create Simple Form

CheckExclude table name in field names generated in new forms [Link] to exclude Table Name.


 Best Rapid Application Development Tool Baadal - Web Form Design

Click on Create button.


 Best Rapid Application Development Tool Baadal - Web Form Design

Baadal will create the User interface of the form on selected Tables automatically. Further, you can modify the controls as per your requirement.


 Best Rapid Application Development Tool Baadal - Form Design UI

In Parent-Child Detail Entry Form, Baadal takes care of input validation in both parent and child tables including, auto-incrementing of the primary key, deleting a selected record, exporting data to excel, data manipulating and other validation/checks on data grid cells (which may be added by you). Whenever you enter the data on parent table input controls and child Data Grid, Baadal maps the foreign key and primary key to child records while performing save action. In addition to this, when you select the parent record, consequently in child grid you will get filtered data mapped to the parent.