FileOutput POST
FileOutput POST
The console tools below make a POST request to generate a dynamic document from the File Output module.
- Design > Script Generator > File Output (Results Download)
- Data Transform > Search Results Output > File Output
*IMPORTANT*
These tools do not have knowledge of the content inside the template. The file output template is expected to contain Data Sources that query tables which contain rows matching the DataIds passed to it in the POST request.
If the downloaded file does not render results that are shown from the website search, please investigate the template file within the File Output record.
The template file either does not contain Data Sources that query tables where the DataIds passed to it reside or the queries have other filters that the website search does not which is excluding results.
Ensuring downloaded files contain the expected results is a responsibility of the console administrator.
These tool sets FormState values for the following IDs: DataIds, Taxonomy
Example SQL Filter for Taxonomy
WHERE LEN('[cp:literal:scripting key='FormState' id='Taxonomy'/]') >= 36
AND (TaxonomyId IN ('[cp:literal:scripting key='FormState' id='Taxonomy' replaceText=', ' replaceWith='cpsys_Apos, cpsys_Apos' /]'))
Example SQL Filter for DataIds
WHERE LEN('[cp:literal:scripting key='FormState' id='DataIds'/]') >= 36
AND (cprel_GenericEnhancedCC.DataId IN ('[cp:literal:scripting key='FormState' id='DataIds' replaceText=', ' replaceWith='cpsys_Apos, cpsys_Apos' /]'))
Form Field Types Reference
Centralpoint Forms support 13 different field types. Here's a quick reference for the most commonly used types:
| Field Type |
Purpose |
Key Parameter |
| FormTextBox |
Single-line or multi-line text |
TextMode='MultiLine', Rows='4' |
| ExtDatePicker |
Date picker with calendar |
sourceFieldId (requires 3 components) |
| FormListBox |
Dropdown selection |
AddListItems (XML format) |
| FormUpload |
File upload control |
defaultValue stores file path |
| FormSignature |
Digital signature capture |
Width, Height (auto-creates 4 metadata fields) |
| FormEditor |
Rich text WYSIWYG editor |
Width='980' |
Key Point: All form fields require a group attribute that must be identical across all form components (HTML, Field Map XML, email templates). Mismatched group names cause silent failures.
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.