# 系统函数

系统函数提供用于访问系统、设备和 Qlik Sense 应用程序 属性的函数。

使用每个函数的下拉列表可查看每个函数的简短描述和语法。对于某些函数，可以通过单击语法描述中的函数名称了解有关该特定函数的更多信息。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### Author()

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

此函数返回一个包含当前应用程序的 author 属性的字符串。此函数均可用于数据加载脚本和图表表达式。

信息注释在当前版本的 Qlik Sense 中无法设置 author 属性。如果迁移 QlikView 文档，将保留 author 属性。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### CalcDim()

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

在维度表达式中使用时，CalcDim() 将覆盖引擎对表达式内部处理方式的自动解释。具体而言，该函数可防止在数据模型中创建新的内部字段。相反，应用程序中的选择将被视为原始数据模型中适用字段中的选择。

[**calcdim**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/calcdim.htm)(expr)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### ClientPlatform()

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

此函数返回客户端浏览器的用户代理字符串。 此函数均可用于数据加载脚本和图表表达式。

示例：

`  Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36 `

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### ComputerName

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

此函数返回操作系统返回的包含引擎实例名称的字符串。 此函数均可用于数据加载脚本和图表表达式。

ComputerName( )

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### DocumentName

此函数返回一个包含当前 Qlik Sense 应用程序名称的字符串，不包括路径，但包括扩展名。 此函数均可用于数据加载脚本和图表表达式。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)DocumentName( )

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### DocumentPath

此函数用于返回一个包含至当前 Qlik Sense 应用程序完整路径的字符串。 此函数均可用于数据加载脚本和图表表达式。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)DocumentPath( )

信息注释Qlik Cloud 中不支持此函数。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### DocumentTitle

此函数用于返回一个包含当前 Qlik Sense 应用程序标题的字符串。 此函数均可用于数据加载脚本和图表表达式。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)DocumentTitle( )

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### EngineVersion

此函数以字符串形式返回完整的 Qlik Sense 引擎版本。

[**EngineVersion**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/EngineVersion.htm)()

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### GetCollationLocale

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

此脚本函数返回所使用的排序规则区域设置的区域性名称。如果未设置变量 CollationLocale，则返回实际的用户计算机区域设置。

GetCollationLocale( )

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### GetObjectField

GetObjectField() 返回维度的 字段表达式。Index 是一个可选整数，表示应返回的维度。

[**GetObjectField**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/GetObjectField.htm)([index])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### GetSysAttr

GetSysAttr() 函数用于返回有关租户和应用程序所在空间的信息。使用 GetSysAttr() 函数，您可以评估租户 ID 和名称、空间 ID 和名称以及有关应用程序所在环境的其他详细信息。此函数简化了可能在不同环境之间移动的 Qlik Sense 应用程序的空间和租户标识。此函数使您能够轻松识别所处的特定环境。这在应用程序生命周期的开发、测试、验收和生产 (DTAP) 阶段特别有用。

[**GetSysAttr**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/GetSysAttr.htm)(name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### GetUserAttr

GetUserAttr() 函数为访问应用程序的用户返回信息。 此函数均可用于数据加载脚本和图表表达式。

[**GetUserAttr**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/GetUserAttr.htm)(name)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### GroupDimensionIndex

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

此函数返回指定循环维度的活动字段的索引。第一个字段的索引值为 1。用单引号输入循环维度的名称。它只能在图表表达式中使用。

GroupDimensionIndex(dim\_name Expression)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### GroupDimensionLabel

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

此函数返回指定循环维度中当前步骤的字段标签。用单引号输入循环维度的名称。它只能在图表表达式中使用。

GroupDimensionLabel(dim\_name Expression)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### IsPartialReload

此函数返回 - 如果当前部分重新加载，则返回1 (True)，否则为 0 (False)。

[**IsPartialReload**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/IsPartialReload.htm)()

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### InObject

InObject() 图表函数计算当前对象是否包含在具有函数参数中指定 ID 的另一个对象中。对象可以是工作表或可视化。

[**InObject**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/InObject.htm)(id\_str)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### ObjectId

ObjectId() 图表函数返回计算表达式的对象的 ID。该函数采用一个可选参数，指定该函数所关注的对象类型。对象可以是工作表或可视化。此函数仅在图表表达式中可用。

[**ObjectId**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/ObjectId.htm)([object\_type\_str])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### OSUser

此函数返回包含当前连接的用户的名称的字符串。 此函数均可用于数据加载脚本和图表表达式。

OSUser( )

信息注释在 Qlik Sense Desktop 和 Qlik Sense Client-Managed Mobile 中，此函数始终返回“Personal\Me”。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### ProductVersion

此函数用于返回完整的 Qlik Sense 版本和内部版本号作为一个字符串。

该函数已弃用并由 EngineVersion() 替代。

[**ProductVersion**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/ProductVersion.htm)()

信息注释Qlik Cloud 中不支持此函数。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### ReloadTime

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

此函数返回上次完成数据加载的时间戳。返回的时间戳为 UTC 格式。 此函数均可用于数据加载脚本和图表表达式。

ReloadTime( )

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

#### StateName

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/system-functions.htm)

StateName() 会返回所使用的可视化的替代状况的名称。例如，StateName 可用于创建具有动态文本和颜色的可视化以反映可视化状态发生的更改。此函数可用于图表表达式，但不能用于确定该表达式所指的状态。

[**StateName**](https://help.qlik.com/zh-CN/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/SystemFunctions/StateName.htm)()

信息注释Qlik Cloud 中不支持此函数。