Custom fields - query and template configuration
This page explains how Connect custom fields work and how to configure them.
Note that there are 2 distinct ways of configuring a custom field, depending on the data source it's associated with:
- REST API
- Database
Principle
There are some similarities when configuring Connect custom fields and connected items.
You first configure a query which will fetch relevant results.
You'll then apply a template on each row of the fetched result set → Note that Connect custom field template is not compatible with Connected items' freemarker, only values from the result set can be displayed, raw.
Performance
- For performance purposes, Elements Connect will only read the first 1,000 rows of a result set. To access the subsequent row, use the userInput parameter
- By default, a 5-minute cache for the datasource exists. This cache is configurable at datasource level and connected field level. Identical queries will fetch the Connected item values directly in the cache
Data source type
The query and template item configuration is different if a SQL or REST API datasource is used