Power BI
Export Power BI table data
/a/PowerBI_getTableData
Stream nonempty repeating-table rows grouped by table form for a tenant-local scheduled-time window.
When to use this endpoint
Use this dataset through PowerBI_getData with module=table_data. The helper’s direct success response has a legacy framing defect described below.
Authentication and permissions
The request must authenticate with signed API-key fields or a logged-in CRM session so that the tenant database and user context are available. The handler performs no page or role-permission check.
This direct dataset route does not consume the unsigned api_id/api_key pair used by the Power BI connector. Use PowerBI_getData for the self-authenticating connector feed.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | String | Yes | An exact lower-bound fragment such as >="2026-09-01". It is not a plain date. |
to | String | Yes | An exact upper-bound fragment such as <="2026-09-30 23:59:59". It is not a plain date. |
Example request
FM_api('PowerBI_getData', [
'api_id' => POWER_BI_API_ID,
'api_key' => POWER_BI_API_KEY,
'module' => 'table_data',
]);
Example response
{
"table_data": {
"27": {
"form_name": "Parts Used",
"field_names": ["Item","Quantity"],
"jobs": [{"job_id":"301","form_id":"12","table_id":27,"Item":"Filter","Quantity":"2"}]
}
}
}
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":"invalid parameter: from"} | from is absent or has the wrong shape. |
{"error":"invalid parameter: to"} | to is absent or has the wrong shape. |
<code>{...}null</code> (invalid JSON) | A successful direct PowerBI_getTableData request is dispatched normally: the helper streams an object, returns null, and does not mark output complete. Use PowerBI_getData. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- The bounds are converted from tenant-local time to epochs and applied inclusively to job scheduled time. Soft-deleted jobs are excluded.
- Only subform fields in forms used by matching jobs are considered. Their configured
extras.valuespoints to the table form ID. - The object is keyed by table ID. Each value has the table form name, its ordered
field_names, and flattenedjobsrows containing job/form/table IDs plus one key per column. - Completely empty rows are skipped using PHP emptiness rules, so values such as string
0do not keep an otherwise empty row. Individual missing cells become empty strings. - String cell values are truncated to 30,000 bytes. Asset cells become scalar ID strings;
[object Object], null, and unsupported objects become empty strings. Non-asset structured values are preserved. - Job IDs are processed in batches of 100. There is no client-controlled pagination.
See it in Fieldmotion
CRM1
The legacy connector exposes one navigation table per configured repeating table under Table Values.
CRM2
CRM2 does not use this export helper for table entry or display.
Related endpoints
PowerBI_getFormDataexports main form values.PowerBI_getDatais the supported aggregate connector feed and supplies tenant settings to this helper.PowerBI_authenticateestablishes the unsigned connector session used by the aggregate feed.