Custom Data Source

How to query your data. And how to use that data in reports, widgets …

The Custom Data Source extension allows you to create queries over your data and then use the results in reports, widgets, or API requests. Unlike simply linking tables, it lets you group data, calculate aggregations, and work with nested links.

 

Why Use It?

Example: You have thousands of orders. Instead of loading all records into a report, you can aggregate the data by country:

IDAmountCountryEtc.
1$213,000.00USA
2$100,000.00AUS

 

how it looks in table

 

CountryTotal Amount
USA$1,123,000.00
AUS$200,000.00

Custom data source
 

This way, you can power a simple widget or report showing just the totals, without loading unnecessary details.
 



 

How to Create a Custom Data Source

  • Install the Custom Data Source extension (see Edit application).
  • In the Data Source table, add a new row.
  • In the definition form: 

        Select a table.

        Choose which fields (columns) to load.

        If needed, select an aggregation type (SUM, COUNT, AVG, etc.).

  • Save – the stored “query” can now be used in reports, widgets, or via the API.

Input screen for the custom data source definition



User Rights

Be careful what data you select to show in a custom data source and who you allow to create or edit them. Unlike normal tables, widgets, or API calls, custom data sources do not automatically respect user permissions.

Access and Permissions

  • A user may see data they normally cannot access (denied tables/fields), for example aggregated in widgets or reports.
  • This makes custom data sources powerful, but also risky if not configured correctly.

Role Conditions

  • By default, user role conditions are applied to new custom data sources.
  • This means records are filtered according to the role of the user under which the data is loaded.
  • Conditions can be disabled for specific custom data sources (e.g., for summary calculations).
  • Only users with permission to change user rights can disable these conditions.

Example

  • You create a custom data source with invoice amounts (individual or sums by month/year).
  • If used in a widget or report, even users who cannot access invoices directly will still see the aggregated numbers.
  • If the same widget is built directly on the invoice table, the user would not see the data.
  • This makes custom data sources useful for showing summarized data to restricted users (e.g., totals), while still keeping details hidden.

Read-only Access

  • If a user has read-only rights to a custom data source:
  • They cannot edit its definition.
  • The stored query in the database is always used when loading results.

Best Practices

  • Use custom data sources to build efficient widgets and reports without overloading the system with raw data.
  • Apply role conditions unless you have a very clear reason to disable them.
  • Be mindful of sensitive fields (e.g., invoices, salaries) – aggregated numbers may reveal data to users who otherwise don’t have access.
  • Use summaries and aggregations to present business insights while still protecting detailed records.

 

Was this article helpful?