Export SQL Builder Utility
This tool typically used by senior developers, allows you to see the SQL Query for any module in your site. By selecting any module, it will provide the complete SQL Statement for all records from that module. This Query can then be used to create Data Sources, Data Transfers, or to build any report.
It has been optimized for use within Data Transfer, and although it could be used for reporting or others tasks (to filter record sets), it is not optimized for those purposes.
DataSource Best Practices
DataSources consist of four components that must work together correctly:
| Component |
Purpose |
| SQL SELECT |
Retrieves data from database |
| Template Content |
Wrapper HTML, runs once at beginning |
| Item Content |
Repeating template for each record |
| Styles (CSS) |
Visual styling (prefer embedding in Template) |
Critical Rules
Rule 1: The Placeholder Requirement
Template Content MUST include: [cp:placeholders key='ItemContent' /]
Without this exact placeholder, rows will NOT render even if SQL returns data.
Rule 2: Attributes vs Standard Fields
Standard fields: name='FieldName'
Attribute fields: name='cpsys_Attributes:FieldName'
They will NOT render if called incorrectly.