# GetObjectField - 图表函数

GetObjectField() 返回维度的名称。Index（索引）是一个可选整数，表明应返回的维度。

信息注释

不能在以下位置的图表中使用此函数：标题、副标题、页脚、参考线表达式和最小/最大表达式。

信息注释

您无法在使用 Object ID 的另一对象中引用维度或度量的名称。

语法：

GetObjectField ([index])

示例：

`GetObjectField(1)` ` `

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/GetObjectField.htm)

#### 示例：图表表达式

Qlik SenseQlik Sense 表以图表表达式显示了 GetObjectFieldGetObjectField 函数的示例。

| transaction\_date | CustomerID | transaction\_quantity | GetObjectField | =GetObjectField (0) | =GetObjectField (1) |
| --- | --- | --- | --- | --- | --- |
| 2018/08/30 | 049681 | 13 | transaction\_date | transaction\_date | CustomerID |
| 2018/08/30 | 203521 | 6 | transaction\_date | transaction\_date | CustomerID |
| 2018/08/30 | 203521 | 21 | transaction\_date | transaction\_date | CustomerID |

如果您希望返回度量的名称，请改为使用 GetObjectMeasure 函数。