Manage Datasources
Prerequisites
- TypeScript
- Entity Tables
Overview
A Datasource is a custom query of the Footprint database that retrieves data from an API for various uses. Datasources can be integrated into functions, reports, editors, or other features and can be reused as needed.
Datesources are located in Datex Studio, which can be accessed from Datex Manager.
Create a New Datasource
When existing Datasources do not meet your needs, a new Datasource can be created.
Tip
While it's possible to build a complex query in a single Datasource, in some cases it may be better to break it into multiple smaller queries to improve performance. These smaller Datasources can be joined together in a Report layout to reduce the time it takes to compile the results.
2. Click Component Packages in the left navigation menu.
A list of all Component Packages will display.
3. Click the Reports Component Package.
4. Click Create Feature Branch, or if a Feature Branch already exists that you wish to work on, click its name to continue in that branch.
The View Main Branch button opens Datex Studio in read-only mode.
Datex Studio will open for creating & editing items (Screens, Datasources, Resources, and so on) for the selected Application.
Please Note
The changes made here will only be available in the specific Application or Component Package initially selected, as well as any Application or Package that references it, and not all Applications and Component Packages.
2. Click + New Datasource to create a new Datasource.
Tip
You can click the name of an existing Datasource and clone it to make modifications instead of creating a new one from scratch.
3. Enter a unique Reference ID. Follow this naming convention: ds_[component or verb-noun]_[context].
Examples:
-
ds_sales_orders_report
-
ds_get_projects_grid
5. Add a Description that is clear for new users and will differentiate between this new datasource and others that may be similar.
6. Toggle Has OnInit to "On" if the Datasource requires an initialization process to handle input parameters, such as required inputs or special pre-processing logic.
7. Set the Access Modifier:
-
Private (default): limits availability to the current component package
-
Public: allows access across all component packages
8. Select the Type of Datasource:
-
oData (explained this document): for an easier user interface
-
Flows: allows custom TypeScript logic
9. Select the API URL, for example, Footprint API or Mongo DB. The available options depend on what your organization has in Datex Manager - API Connections.
At any time during Datasource configuration, use the icons in the top toolbar to:
-
view the History of the Datasource changes
-
Lock & Edit to prevent other users from make changes to the Datasource at the same time
-
Revert or undo changes made to the Datasource
-
Save the Datasource changes that were made
-
update the Datasource Settings
-
add Inputs, allowing users to set them on-screen (can be required, allow duplicates, etc)
-
view the Outputs, which are built automatically as the green Datasource options are set
-
Clone the Datasource to make modifications
-
Export the Datasource
Set of Entities
1. Select a root Entity from the Set of Entities dropdown.
This represents the SQL table being queried (e.g., Orders, Projects, LicensePlateContents).
2. (Optional) Click Add Specific Entity to filter results to a specific entity ID instead of using the Include Results Where filter detailed below in step 7.
This allows you to directly query an entity using its ID rather than applying conditional filters.
If you choose to query a specific entity, you may also click Add Entity Navigation Property to return only the specified properties in the results.
3. (Optional) Toggle Output Only First Item as a Single Object to return a single object instead of a JSON array of values. This simplifies data handling for flow-based Datasources when only one record is needed.
4. (Optional) Click Apply Transformation to group, filter, or aggregate results before applying additional filters.
5. (Optional) Click the Take All, Skip None, and/or Don't Include Count toggles to implement these features in the results.
Selects
6. Click into the Selects field to choose properties (columns) from the selected root entity. The Entity ID Key is included by default.
Filtering
7. (Optional) In Include Results Where, click the green Add Condition to specify an oData filter using TypeScript.
-
Refer to Microsoft Learn or chatGPT for help with oData functions in TypeScript.
-
Choose to Always Apply Condition or Only Apply Condition When to enable conditional filtering. Add as many conditions as are needed to filter the results.
Tip
You can filter by values not included in the results.
Sorting
Expands
The entities to choose from in the green fields are entities that have a relationship with the root entity first selected.
Filtering at the expand entity level does not affect the result set returned from the root entity.
9. (Optional) Click Expand Within to select another entity from which you would like to include properties in the results. This will perform the equivalent of an SQL left join.
The screen will update, allowing steps 5-9 to be repeated for the Expand Within selected entity. A server-level default of oData only allows a maximum of 5 nested Expand Within operations. (This limit may increase to 50 in the future.)
Note
If more than 5000 records, may cause the oData query to fail. If this is the case, reduce the 'Expand Within' or consider adding "Paging."
10. (Optional) To perform the equivalent of an SQL left outer join, use Expand to Another Datasource.
Edit an Existing Datasource
When an existing Datasource needs to be updated, or modified to fit an additional purpose, the process is fairly simple.
2. Click Component Packages in the left navigation menu.
A list of all Component Packages will display.
3. Click the Reports Component Package.
4. Click Create Feature Branch, or if a Feature Branch already exists that you wish to work on, click its name to continue in that branch.
The View Main Branch button opens Datex Studio in read-only mode.
Datex Studio will open for creating & editing items (Screens, Datasources, Resources, and so on) for the selected Application.
Please Note
The changes made here will only be available in the specific Application or Component Package initially selected, as well as any Application or Package that references it, and not all Applications and Component Packages.
2. Click + New Datasource to create a new Datasource.
Tip
You can click the name of an existing Datasource and clone it to make modifications instead of creating a new one from scratch.
3. Make the necessary changes to the Datasource. Use the details in Step 3. Configure the Datasource above for reference.
| Last Updated: |
| 07/20/2026 |



























