Skip to content

MeasureOperation

reference
1 min readUpdated

Kind: Class

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

Part of: Pams

MeasureOperation stores display and persistence metadata for a dashboard measure field. It tracks the field name, stored name, caption, measure type, and hidden state for use by dashboard data-field handling.

Methods

MethodSignatureReturns
isHiddenisHidden()boolean
setHiddensetHidden(flag: boolean)void
GetStoredNameGetStoredName()string
SetStoredNameSetStoredName(name: string)void
GetFieldNameGetFieldName()string
SetFieldNameSetFieldName(name: string)void
GetTypeGetType()Measure
SetTypeSetType(type: Measure)void
GetCaptionGetCaption()string
SetCaptionSetCaption(input: string)void
SetDataTypeSetDataType(ty: DataTypeEnum)void
GetDataTypeGetDataType()DataTypeEnum

Where it refuses work

  • MeasureOperation stops the work with an early return when this.Field.StoredName.
  • MeasureOperation stops the work with an early return when this.Field.FieldName.

Diagram

mermaid
graph LR
  MeasureOperation --> FieldName
  MeasureOperation --> StoredName
  MeasureOperation --> Caption
  MeasureOperation --> MeasureType[Measure]
  MeasureOperation --> HiddenState

Usage

ts
import { MeasureOperation } from "./core/models/dashboard-data-fields";

const operation = new MeasureOperation();

operation.SetFieldName("Revenue");
operation.SetStoredName("revenue");
operation.SetCaption("Revenue");
operation.setHidden();

console.log(operation.GetFieldName());
console.log(operation.GetStoredName());
console.log(operation.GetCaption());
console.log(operation.isHidden());

AI Coding Instructions

  • Use the Set* methods to update measure metadata rather than assigning internal properties directly.
  • Read values through the matching Get* methods when preparing dashboard field configuration.
  • Call setHidden() and isHidden() when filtering fields from dashboard display logic.
  • Keep GetFieldName() and GetStoredName() aligned with the field identifiers expected by the dashboard data source.
  • Set the measure type through SetType() before code depends on GetType().

Was this page helpful?

Download as PDF