When to use this endpoint

Use to resolve a sum(Table field.Column) expression in the legacy quote form editor. The first component is the parent form field label, not the linked table form’s name.

Authentication and permissions

Authenticates a signed API key or CRM session as its tenant user. Requires Quotes View (pageQuotes_view). Non-admin users blocked by legacy crm_access bit 32 are denied. Roleless non-admin users fail closed. Client administrators inherit page permissions.

Uses local tenant IDs. No additional Quote owner/department predicate is applied; these endpoints do not return a visibility-filtered Job list.

Parameters

ParameterTypeRequiredDescription
idPositive integer-compatible quote IDYesPositive local quote ID, integer-converted; an active quote is required.
nameTable-field label.Column labelYesExact parent field name and linked table column name separated by one period. Additional periods and ambiguous names fail.

Example request

$sum = FM_api('Quote_getTableColumnSum', ['id'=>'1042','name'=>'Parts used.Quantity']);

Example response

{"tableName":"Parts used","columnName":"Quantity","sum":12.5}

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":"quote does not exist"}The active quote is missing (lookup failures are reported separately).
{"error":"permission denied"}Required Quotes permission is absent or the non-admin actor is blocked by legacy access settings.
{"error":"missing or invalid parameter: id"}Missing/nonpositive quote ID.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Requires an active quote, an existing parent Form and exact FieldName.ColumnName with one period. Resolves the parent field’s linked Form and both stable metadata IDs; duplicate names, missing Forms/columns and malformed definitions return errors.
  • Reads encoded JSON rows from the parent form_fields answer. A valid absent/empty table returns zero. Invalid row JSON, non-row entries and non-numeric nonempty cells return errors; missing/blank cells contribute zero. Stable IDs are preserved as keys rather than converted to floating point.
  • Returns tableName, columnName and numeric sum. No form_tables lookup, record mutation, ordering or pagination. A non-finite sum is rejected.
  • No direct mobile app/m-service caller for this RPC was found.

Side effects

  • Read-only; no recalculation write, cache invalidation, history or external request.

See it in Fieldmotion

CRM1

Quotes → Notes/Fields calculations call Quote_getTableColumnSum for unresolved sum(...) expressions and cache the returned tableName.columnName result in the browser.

CRM2

No direct Quote_getTableColumnSum caller found. widgetFormField resolves calculations from its client-side value scope rather than this RPC.

Related endpoints