Form definitions, recorded responses and exports
Download one table’s recorded rows
/a/Form_exportTableData
Export saved rows of one linked table across all nondeleted Jobs using its single detected parent form.
When to use this endpoint
Use the legacy Form editor’s table export when one table has exactly one parent definition. For date-filtered parent-form exports, use Form_exportDataAsCSVWithSubforms instead.
Authentication and permissions
Authenticate with a signed API key (acting as its owner) or a logged-in CRM session on the routed account host. Session calls include the dispatcher’s CSRF value when configured. IDs refer to the authenticated tenant unless an explicit cross-account copy is described.
Requires authenticated tenant context, with no additional Forms/Report role check or Job record-scope predicate. The dispatcher still authenticates this legacy handler.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Positive integer-compatible ID | Yes | Linked table Form ID, not a parent Form or Job ID. No form-type restriction is enforced. |
Example request
$csv = FM_api('Form_exportTableData', ['id'=>'1043']);
Example response
"App ID","App Time",Item
2081,"2026-11-26 09:00:00",Filter
Database numeric values can be JSON strings. Examples are representative; legacy application errors can use HTTP 200, so inspect the decoded response.
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"missing or invalid parameter: id"} | No positive table ID. |
could not retrieve fields for the subtable | Plain-text termination: no usable fields. |
more than one form uses this subtable. cannot generate single export file | Plain-text termination: multiple matching parent definitions. |
this subtable is not used by any forms | Plain-text termination: no parent matched the serialized-field search. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- CSV attachment filename tabledata.csv, Content-Type text/csv, no BOM or JSON success wrapper. App ID is the server Job ID, not a mobile app-generated identifier. App Time is the Job scheduled datetime converted to account-local time. Remaining headers are current table field names.
- Discovers parents using literal JSON-text LIKE patterns requiring the subform marker and an extras.values string in a particular serialization shape. It does not consult form_parents metadata or normalize JSON. No parent, multiple parents or missing table fields terminate with plain text.
- Selects every nondeleted Job with the one detected parent form_id, ordered by scheduled epoch without an ID tie-breaker. Expands nonempty subform_values[id] rows. No date, status, department, user, search or pagination filters; supplied daysFrom/daysTo/department_id are ignored.
- Flat table rows are emitted as saved, without padding to the current field count or display-name resolution. A nested array (for example multi-select) becomes a row whose first answer is MULTIDIMENSIONAL ARRAY NOT VALID FOR EXPORT rather than a recursively flattened value.
Side effects
- Builds the complete export in memory, writes a tenant-specific temporary tabledata.csv and streams that file. No business-data changes or history entries. The shared filename is reused by concurrent exports for the same tenant.
See it in Fieldmotion
CRM1
In the Form editor, choose Export for a linked table; the hidden POST form sends only its id. Filter Form_exportTableData.
CRM2
No direct CRM2 caller found for this route. Its Form Data export with tables enabled uses Form_exportDataAsCSVWithSubforms.
Related endpoints
Form_exportDataAsCSVWithSubforms— use parent-form/date filters and streamed output.Form_tableDataGetDT— page relative-date table results.