Skip to content

ActiveTotal

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/core/models/dashboard-data-fields.ts (line 377)

Part of: Pams

ActiveTotal stores the field metadata used to represent an active total in dashboard data. It keeps the stored field name, display field name, caption, delta type, and data type together for dashboard rendering and data processing.

Methods

MethodSignatureReturns
GetStoredNameGetStoredName()string
SetStoredNameSetStoredName(name: string)void
GetFieldNameGetFieldName()string
SetFieldNameSetFieldName(name: string)void
GetTypeGetType()DeltaTypeEnum
SetTypeSetType(type: DeltaTypeEnum)void
GetCaptionGetCaption()string
SetCaptionSetCaption(input: string)void
SetDataTypeSetDataType(ty: DataTypeEnum)void
GetDataTypeGetDataType()DataTypeEnum
GetFieldNameTargetGetFieldNameTarget()string
SetFieldNameTargetSetFieldNameTarget(name: string)void
GetStoredNameTargetGetStoredNameTarget()string
SetStoredNameTargetSetStoredNameTarget(name: string)void

Properties

PropertyType
Typeany

Where it refuses work

  • ActiveTotal stops the work with an early return when this.FieldName.

Diagram

mermaid
graph LR
  ActiveTotal --> StoredName
  ActiveTotal --> FieldName
  ActiveTotal --> Caption
  ActiveTotal --> DeltaTypeEnum
  ActiveTotal --> DataTypeEnum
  Dashboard --> ActiveTotal

Usage

ts
function configureActiveTotal(
  activeTotal: ActiveTotal,
  storedName: string,
  fieldName: string,
  caption: string,
  type: DeltaTypeEnum,
  dataType: DataTypeEnum,
): void {
  activeTotal.SetStoredName(storedName);
  activeTotal.SetFieldName(fieldName);
  activeTotal.SetCaption(caption);
  activeTotal.SetType(type);
  activeTotal.SetDataType(dataType);

  console.log(activeTotal.GetCaption());
  console.log(activeTotal.GetFieldName());
}

AI Coding Instructions

  • Set all field metadata before passing an ActiveTotal instance to dashboard rendering or data-processing code.
  • Use GetStoredName() for persisted or source-field references and GetFieldName() for the dashboard-facing field name.
  • Keep DeltaTypeEnum and DataTypeEnum values aligned with the field’s actual calculation and source data.
  • Use GetCaption() for display text rather than deriving labels from stored field names.

Was this page helpful?

Download as PDF