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
| Method | Signature | Returns |
|---|---|---|
GetStoredName | GetStoredName() | string |
SetStoredName | SetStoredName(name: string) | void |
GetFieldName | GetFieldName() | string |
SetFieldName | SetFieldName(name: string) | void |
GetType | GetType() | DeltaTypeEnum |
SetType | SetType(type: DeltaTypeEnum) | void |
GetCaption | GetCaption() | string |
SetCaption | SetCaption(input: string) | void |
SetDataType | SetDataType(ty: DataTypeEnum) | void |
GetDataType | GetDataType() | DataTypeEnum |
GetFieldNameTarget | GetFieldNameTarget() | string |
SetFieldNameTarget | SetFieldNameTarget(name: string) | void |
GetStoredNameTarget | GetStoredNameTarget() | string |
SetStoredNameTarget | SetStoredNameTarget(name: string) | void |
Properties
| Property | Type |
|---|---|
Type | any |
Where it refuses work
ActiveTotalstops the work with an early return whenthis.FieldName.
Diagram
mermaidgraph LR ActiveTotal --> StoredName ActiveTotal --> FieldName ActiveTotal --> Caption ActiveTotal --> DeltaTypeEnum ActiveTotal --> DataTypeEnum Dashboard --> ActiveTotal
Usage
tsfunction 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
ActiveTotalinstance to dashboard rendering or data-processing code. - Use
GetStoredName()for persisted or source-field references andGetFieldName()for the dashboard-facing field name. - Keep
DeltaTypeEnumandDataTypeEnumvalues 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?