When to use this endpoint

Use this dataset through PowerBI_getData with module=form_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

ParameterTypeRequiredDescription
fromStringYesAn exact lower-bound fragment such as >="2026-09-01". It is not a plain date.
toStringYesAn 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' => 'form_data',
]);

Example response

{
  "form_data": {
    "12": {
      "form_name": "Service Visit",
      "jobs": [{"job_id":"301","form_id":"12","Serial Number":"A-17","Inspection Date":"2026-09-03"}]
    }
  }
}

Errors and unusual responses

ResponseCondition
{"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: from"}from is absent.
{"error":"missing or invalid parameter: to"}to is absent.
{"error":"invalid parameter: from"} / {"error":"invalid parameter: to"}A bound has the wrong exact shape.
<code>{...}null</code> (invalid JSON)A successful direct PowerBI_getFormData 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.
  • The streamed object is keyed by form ID. Each value contains form_name and a jobs array; each job row starts with job_id/form_id and contains every configured field name, defaulting missing values to an empty string.
  • Jobs are processed in batches of 100; there is no client-controlled pagination. Forms and jobs are ordered by ID and scheduled time respectively as implemented.
  • Field names are truncated to 234 bytes and string values to 30,000 bytes. Asset picker values become ID strings whether stored as a scalar or object; [object Object] and unsupported objects become empty strings. Other arrays/objects are preserved.
  • A stored 0000-00-00 in a configured date field becomes JSON null. Values are recursively converted from ISO-8859-1 to UTF-8 before encoding.
  • Form names are escaped and concatenated into the JSON stream rather than passed through json_encode; unusual control characters in a stored name can make the streamed object invalid.

See it in Fieldmotion

CRM1

The legacy connector exposes one navigation table per job form under Form Values.

CRM2

CRM2 does not use this export helper for form entry or display.

Related endpoints