Add a File Field - Stored on DB
A File field, that is stored on DB, lets users add a file to a record in the Web Application. This is then stored in the database. The details below allows for storing a single file on a component. The next section explains how to create a relationship to the File Component so that multiple files can be stored in the database for a record.
To add MANY Files (Stored on DB) to a component and a form (Recommended Configuration)
Each file that is stored in the database can carry additional information about that file, called metadata. The File component allows you to capture metadata about the file you store to the database.
In order to be able to store multiple files in the database for a record, a relationship to the Files Component will need to be created.
- Open the Component in Component Management.
- Click on the Data Fields tab. A subform displays all the existing data fields.
- Click on Add New Relationships (found at the bottom of the subform)
- Select File as the Related Component.
- Enter the Relationship Name (from THIS component).
- Enter the Relationship Name (from RELATED component).
- Set the Number of records as follows:
- 1 [THIS Component] record can have how many [RELATED component] records? Answer = Many
- 1 [RELATED Component] record can have how many [THIS component] records? Answer = 1
- Save.
- Add the new data field to the form as a Subform. Save the form.
- Run a Publish.
To add a SINGLE File field (Stored on DB) to a component and a form
- Open the Component in Component Management.
- Click on the tab Relationships. A subform displays all the existing data fields.
- Click on Add New Relationships (found at the bottom of the subform)
- Select obj.com.bmssolutions.DBFile as the Related Component.
- Enter the Relationship Name (from THIS component).
- Enter the Relationship Name (from RELATED component).
- IMPORTANT: Set the Number of records as follows:
- 1 [THIS Component] record can have how many [RELATED component] records? Answer = 1
- 1 [RELATED Component] record can have how many [THIS component] records? Answer = 1
- Save.
- Add the new data field to the form as a Subform. Save the form.
- Run a Publish.
|