DataSources Explanation
What is a DataSource?
A datasource is a data source used to execute queries and retrieve information that will be displayed in form fields. For example, a datasource can perform an SQL or MongoDB query, or obtain data from a JavaScript function to a database to fetch specific information. This information can then be used to populate fields in a form.
Components
Datasource List
In this section, users can view all previously defined datasources. Each datasource is presented clearly and in an organized manner, making it easy to identify and select the desired datasource for viewing or modification.
Search Filter
Users can use the name search filter to find datasources more easily.
Creating a New DataSource
To create a new datasource, users simply need to click the creation ("+") button in the interface. This will open an intuitive interface that guides users through the process of designing and configuring the new datasource, allowing them to customize it according to their specific needs.
Datasources can be created to retrieve data by querying either an SQL database, a MongoDB database, or using a JavaScript function.
Execution mode
When creating a datasource, it’s important to define its execution mode, as this will determine how the datasource behaves in relation to the form instances that use it:
Current version: When this option is selected, all form instances using this datasource will always access its most recent version. This means that any modification made to the datasource will be immediately reflected in all instances that use it, even in those that existed before the modification.
Historical version: When this option is chosen, each form instance will maintain a copy of the datasource as it was at the time of its creation. This means that subsequent modifications to the datasource will not affect existing instances, as each one will preserve the version of the datasource that was in effect when it was created. This option is useful when you need to maintain historical data consistency or when datasource modifications should not affect existing instances.
Modifying DataSources
Users also have the ability to edit existing datasources as needed. They can access the editing options of a specific datasource by clicking on it within the datasource list and making the necessary modifications. To learn more about how to modify a datasource, click here.
