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
| Method | Signature | Returns |
|---|---|---|
isHidden | isHidden() | boolean |
setHidden | setHidden(flag: boolean) | void |
GetStoredName | GetStoredName() | string |
SetStoredName | SetStoredName(name: string) | void |
GetFieldName | GetFieldName() | string |
SetFieldName | SetFieldName(name: string) | void |
GetType | GetType() | Measure |
SetType | SetType(type: Measure) | void |
GetCaption | GetCaption() | string |
SetCaption | SetCaption(input: string) | void |
SetDataType | SetDataType(ty: DataTypeEnum) | void |
GetDataType | GetDataType() | DataTypeEnum |
Where it refuses work
MeasureOperationstops the work with an early return whenthis.Field.StoredName.MeasureOperationstops the work with an early return whenthis.Field.FieldName.
Diagram
mermaidgraph LR MeasureOperation --> FieldName MeasureOperation --> StoredName MeasureOperation --> Caption MeasureOperation --> MeasureType[Measure] MeasureOperation --> HiddenState
Usage
tsimport { 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()andisHidden()when filtering fields from dashboard display logic. - Keep
GetFieldName()andGetStoredName()aligned with the field identifiers expected by the dashboard data source. - Set the measure type through
SetType()before code depends onGetType().
Was this page helpful?