SubFormv5
The form tool used to create tabs in a form and to run other forms linked to it inside that form. With this tool, other forms linked to the form can be shown on the same page.
|
|
The SubForm component is used only on free forms. It cannot be used on responsive forms. |
| Appearance in Toolbox | Appearance in Free Form | Appearance in Responsive Form |
|
|
|
|
Compatibility
| Free Form | Responsive Form | Mobile |
|
|
|
|
Properties of the SubForm tool:

Type (Field Type): Shows the field type of the added form tool. This value cannot be changed.
Name (Field Name): The name of the field to be created in the database is written here.
Info Text: A hint can be written on the Client side about what kind of information to enter.
Height/Width:Sets the height and width of the form tool.
From Left / Top:Sets the distance of the tool from the left and top (this field has been removed from Responsive Forms)
Display: When 'No', hides the form tool on the Client screen.
Module:Choose the module that contains the form to link to the subform.
Form: Choose the form containing the data to show in the subform tool.
Subform Mapping: After choosing the form above, the selected form's fields are listed in the mapping field column. Assign the fields to match (on the form where you added the subform) in the Value column to complete the mapping.

Subform Example:
1. Creating the Sub Form (Detail Form)
First, prepare the sub form to be used in the SubForm component. It contains the detail information linked to the main form. For example, for a customer detail form:
- Form Name: CustomersDetail
- Table Name: CustomersDetail
- Fields: CustomerCode
CustomerName
ContactName
Department
Phone
This form will be used in the SubForm that shows details according to the customer selected in the main form.

After saving the form with Run, go to the Client screen, enter a few records and save.

2. Creating the Main Form
Now create the main form that will contain the sub form. Back in Studio, create a main form with drop-down boxes named CustomerCode and CustomerName.
- Form Name: Customers
- Table Name: Customers
- Fields:CustomerCode (dropdownbox)
CustomerName (dropdownbox)
Write queries in the drop-down boxes that list customer codes and names, as below.

Customer Code drop-down SQL query:
SELECT
CustomerCode,
CustomerCode
FROM CustomersDetail WITH (NOLOCK)
Then add the SubForm component for the sub form to be shown inside the main form and choose the Module/Form fields. In the Mapping list, match the fields between the main form and the sub form. This mapping updates the matched field in the sub form automatically when the field in the main form changes.
3. SubForm Settings
After selecting the SubForm component:
- Module / Form: Choose SubForm / CustomersDetail.
- Mapping:
(Mapping tables: CustomersDetail – Customers)
CustomerCode → CustomerCode
CustomerName → CustomerName

With this mapping, according to the CustomerCode and CustomerName entered in the main form, the sub form loads the matching records automatically.

Save the form and go to the Client screen with Run. The Client screen of our form is as below. When CustomerCode and CustomerName are chosen, the Customer Information area fills automatically because these fields are mapped in the subform.

