# CalcItem

> Source: https://manual.pvxplus.com/views-system/views-definition-object/calcitem

The **CalcItem** subordinate object is used to define a calculated item in a view. See **[Define Calculated Items](https://manual.pvxplus.com/views-system/view-maintenance/define-calculated-items)**. One is defined for each item. The **CalcItem** object corresponds to a record in the *pvxview.clc* file.

For information on the *pvxview.clc* file structure, see **[Views System File Structures](https://manual.pvxplus.com/views-system/views-system-file-structures/overview#clc)**. Properties are read only and are set using corresponding **Set*xxx*( )** methods.

*(The CalcItem subordinate object was added in PxPlus 2021.)*

## CalcItem Properties

The following table lists the properties of the **CalcItem** subordinate object:

| **Property** | **Description** |
| --- | --- |
| **Class$** | Class of item. |
| **DataType$** | Data type:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| S \| String data ***(Default)*** \|<br>\| N \| Numeric data \| |
| **Description$** | Item description. |
| **Expression$** | Formula/expression to derive the data. |
| **InternalD$** | Internal identifier for the calculated item. |
| **Length** | Maximum item length. |
| **Name$** | Field or column name (no trailing "$"). |
| **ParentSource** | Object identifier for the parent view object. |

## CalcItem Methods

The following table lists the methods of the **CalcItem** subordinate object:

| **Method** | **Description** |
| --- | --- |
| **Description$( )** | Returns the description. |
| SetClass(*Class$***)** | Set class of item. *(Not Currently Used)* |
| SetType(*Type$***)** | Set data type:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| S \| String data \|<br>\| N \| Numeric data \| |
| SetDescription(*Description$***)** | Set item description. |
| SetExpression(*Expression$***)** | Set formula/expression to derive the data. |
| SetInternalID(*InternalID*) | ***(Internal Use Only)***<br>Set internal identifier for the data source element. |
| SetLength(*Length*) | Set item length. |
| SetName(*Name$***)** | Set field or column name (no trailing "$"). |
