Create a Digitise Forms Datasource
You will need to create a Digitise Forms Datasource where you don't have access to an existing database which you can use instead. For example, to store the data entered by users of your form or to provide a list of items to populate a Check List, Drop List or Radio List where you can't pull the required list from an already existing database.
You can create a Digitise Forms Datasource in one of the following two ways:

This option creates an empty Datasource. After creating the Datasource you will need to manually specify the columns required in the database table by creating one or more Datasets for the Datasource.
To create an empty Datasource:
- Click on the top half of the New Datasource button on the Ribbon's Data tab
or
- Right-click on the background of the Project Explorer's Datasources tab and choose New Empty Datasource.
You can also access this option by clicking on the lower half of the New Datasource button or from the Project Explorer's Project tab by right-clicking on the Datasources node.
An empty Datasource will be created and added to the Datasources and Project tabs in the Project Explorer. The Datasource will be called Datasource, unless you have created other empty Datasources and not changed their names, in which case your new Datasource will be named Datasource_n where n is a number automatically added in sequence to the end of the name to create a unique name for each Datasource.
You can now configure the Datasource properties, and then you will need to create a Dataset to define the data to be stored in your new database.

This option creates a new Dataset in the Project Datasource containing a data column for all mappable Elements, except Recordset Elements, on the current form, which don't already have an output mapping defined. We refer to this Dataset as the form Dataset, since it is created to match the form's contents and is intended to be used to store most, if not all, of the data input into the form at runtime. (Note, however, that you don't have to create and use a form Dataset; if you want to store the form's input elsewhere you can do so but the form Dataset provides a quick and easy way to create a Dataset to store the form's data if you don't have another database you want to use.)
If you have any Recordset Elements on your form which have been output mapped using static columns and for which you haven't already created Datasets to define the database columns, New Datasource from Form will create a separate Dataset in the Project Datasource for each such Recordset. This means that each Recordset has its own database table, in which the information input into it by a user, when filling out the form, can be stored when the form is submitted. Each row in the Recordset will be output as a separate record in the corresponding Dataset. Note that if you are using New Datasource from Form in conjunction with static columns you must add at least one other output-mappable Element to your form besides any Recordsets. This is because the Recordset Datasets have to be linked back to the form, which is only done when New Datasource from Form creates a Dataset for non-Recordset Elements on the form.
Once the Datasets have been created, all relevant Elements will be output mapped to the new Dataset's columns - see Map Data to Elements for more information about mapping data items.
This option provides a simple way to create the database tables required to store the information entered into the form by users, since it will define the table(s) and output map all mappable Elements for you, where they are not already mapped. When a user submits a completed form, the information from their form will be stored in the database table(s) defined by this option. You can then extract and deal with the stored information later. If you don't need to store data from all the Elements on your form, you can remove any redundant columns and output mappings after the Dataset has been generated.
To create a Datasource from the form Elements:
- Click on the lower half of the New Datasource button on the Ribbon's Data tab and then choose New Datasource from Form
or
- Right-click on the background of the Project Explorer's Datasources tab and choose New Datasource from Form.
You can also access this option from the Project Explorer by right-clicking on the background of the Pages tab or by right-clicking on the Datasources node under the Project tab.
If the Project Datasource doesn't already exist, it will be created and added to the Datasources and Project tabs in the Project Explorer and a form Dataset will be added to it along with any relevant Recordset Datasets.
If you use this option, we recommend that, if possible, you do so once you are sure you have added all the required Elements to the form.
However, if you do later make changes to your form, you can recreate the Dataset using this same option. Where possible, we suggest you delete the original Dataset and then create a new one to incorporate your changes. If you don't delete the original Dataset first, columns in the original Dataset which relate to Elements which have since been deleted from the form, will remain in the Dataset and won't be deleted. This allows you to make changes after the form has been used without deleting previously entered data. However, if you no longer require these columns or the data in them, you can manually remove them from the Dataset under the Mappings tab.
If you have multiple forms within the current project, a Datasource will only be created for the current form.
Any Recordset Datasets created by this option will automatically be linked to the form Dataset by a Foreign Key relationship based on the form Dataset's Primary Key, so that records in the Recordset Dataset can be matched to the form record to which they belong. By default the Recordset Datasets will be configured to be uploaded to the database when the form Dataset is uploaded, so you don't have to upload the Recordsets separately and each Recordset record will automatically be linked to its parent form record by having the form record's Primary Key inserted into each record. However, if you are downloading data from the form Dataset, the default settings won't download the Recordset Dataset(s) as well and you will need to design your form to download Recordset data separately. If you want the Recordset Dataset(s) to be downloaded with their form Dataset, you can configure the Recordset Dataset(s) to do this using the Download with Parent property. For more information see Handling Datasets with Foreign Keys.
- If you have a Recordset Element on your form which is output mapped to an Imported Datasource, New Datasource from Form will not create a Dataset for that Recordset and won't change the current mappings for that Recordset.
Digitise Forms Datasources are indicated on the Datasources tab by the following icon: .
Once you have created a Datasource, you will then need to configure it using the Datasource properties. For example, you can change the name of the Datasource to something more meaningful, specify where you want to store the database which will be created and specify the use of Stored Procedures for writing data to the database.
If you define a Digitise Forms Datasource within Form Studio, when you publish your project the database will be created as part of the publish process, if it doesn't exist already. If you subsequently want to make any changes to the database after it has been created, we recommend that you make the changes within Form Studio and republish your project, rather than using an external app or SQL script to implement the changes.