# 系统函数

系统函数可提供用于访问系统、设备和 QlikView 文档属性的函数。

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

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### Author

此函数返回一个包含当前文档的 author 属性的字符串。此函数均可在加载脚本和图表表达式中使用。

Author( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### ClientPlatform

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

示例：

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

ClientPlatform( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### ComputerName

此函数返回操作系统返回的包含计算机名称的字符串。 此函数均可在加载脚本和图表表达式中使用。

ComputerName( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### DocumentName

此函数返回一个包含当前 QlikView 文档名称的字符串，不包括路径，但包括扩展名。 此函数均可在加载脚本和图表表达式中使用。

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)DocumentName( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### DocumentPath

此函数用于返回一个包含至当前 QlikView 文档完整路径的字符串。 此函数均可在加载脚本和图表表达式中使用。

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)DocumentPath( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### DocumentTitle

此函数用于返回一个包含当前 QlikView 文档标题的字符串。 此函数均可在加载脚本和图表表达式中使用。

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)DocumentTitle( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### GetCollationLocale

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

GetCollationLocale( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### GetActiveSheetID

返回一个包含活动工作表 ID 的字符串。

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)GetActiveSheetID( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### GetExtendedProperty

此函数用于返回表格对象中称为扩展属性的值，并包括指定的对象 ID。如果未给出 objectid，将使用包含表达式的表格对象。扩展属性是对表达式对象在其定义文件中的定义。

[**GetExtendedProperty**](https://help.qlik.com/zh-CN/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/GetExtendedProperty.htm)(name[, objectid])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### GetObjectField

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

[**GetObjectField**](https://help.qlik.com/zh-CN/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/GetObjectField.htm)([index])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### GetRegistryString

此函数返回 Windows 注册表项的值。 此函数均可在加载脚本和图表表达式中使用。

GetRegistryString(path, key)

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### Input

此函数只可用于脚本中，在脚本执行期间它会打开一个输入框提示用户输入值。参数 cue 及标题各自用作信息及标题文本。函数返回输入值。

如果取消，关闭对话框或对话框无法显示，则输入框函数将返回 NULL。

示例：

` Load 
 Input('Enter value', 'Input box') as v, Recno () as r autogenerate 3;  `

Input(str cue [, str caption])

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### IsPartialReload

如果当前重新加载是部分重新加载，则返回 -1 (True)，否则返回 0 (False)。这仅在脚本中有效。

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)IsPartialReload( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### MsgBox

此函数只可用于脚本中，在脚本执行期间它打开一个信息框。参数 msg 和 caption 分别作为信息和标题文本。参数 mb\_buttons 根据以下条件定义在信息框中显示什么按钮：

0 或 'OK' 对应一个 OK 按钮，  
1 或 'OKCANCEL' 对应两个按钮：OK 和 Cancel，  
2 或 'ABORTRETRYIGNORE' 对应三个按钮：Abort、Retry 和 Ignore，  
3 或 'YESNOCANCEL' 对应三个按钮：Yes、No 和 Cancel，  
4 或 'YESNO' 对应两个按钮 Yes 和 No,  
5 或 'RETRYCANCEL' 对应两个按钮：Retry 和 Cancel，

参数 mb\_icons 根据以下条件定义在信息框中显示什么图标：

0 或空字符串对应于无图标，  
16 或 'ICONHAND' 对应带有 X 的图标，用于表示重要错误，  
32 或 'ICONQUESTION' 对应带有问号的图标，  
48 或 'ICONEXCLAMATION' 对应带有惊叹号的图标，用于表示小错误、告诫和警告  
64 或 'ICONASTERISK' 对应带有 i 的图标，用于表示信息性消息。

参数 mb\_defbutton 根据以下条件定义当显示信息框时选中什么按钮：

0 或 'DEFBUTTON1'，如果第一个按钮应有焦点，  
256 或 'DEFBUTTON2'，如果第二个按钮应有焦点，  
512 或 'DEFBUTTON3'，如果第三个按钮应有焦点，  
768 或 'DEFBUTTON4'，如果第四个按钮应有焦点。

函数返回一个整数，根据以下显示用户按了什么键：

1 对于 OK，  
2 对应 Cancel，  
3 对应 Abort，  
4 对应 Retry，  
5 对应 Ignore，  
6 对应 Yes，  
7 对应 No

参数 3，4 和 5 将会从内部被添加，因此如果使用了以上所提数值以外的数值，您可能获得一个意外的图标和按钮的组合。

如果无法显示对话框，信息框函数返回 NULL。

示例：

` Load 
 MsgBox('Message 2', 'msgbox', 'OKCANCEL', 'ICONASTERISK') as x, 2 as r 
 autogenerate 1;  `

MsgBox(str msg [, str caption [, mb\_buttons [, mb\_icons[, mb\_defbutton]]]] )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### OSUser

此函数返回操作系统返回的包含当前用户名的字符串。 此函数均可在加载脚本和图表表达式中使用。

OSUser( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### QlikViewVersion

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

[QlikViewVersion - 脚本和图表函数](https://help.qlik.com/zh-CN/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/QlikViewVersion.htm)()

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### QVuser

返回对于区域权限中输入的包含当前 QlikView 用户姓名的字符串。

QVuser( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### ReloadTime

此函数返回上次完成数据加载的时间戳。 此函数均可在加载脚本和图表表达式中使用。

ReloadTime( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/system-functions.htm)

#### StateName

此图表函数用于返回所使用的对象的状态名称。当对象状态更改时，QlikView 开发者可以使用该函数制作动态文本和颜色。需要特别注意的是该函数仅能作用于对象。它不可以在图表表达式中用来定义该表达式涉及的任何状态。

[**StateName**](https://help.qlik.com/zh-CN/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/SystemFunctions/StateName.htm)()

## 了解详情

* [GetFolderPath - 脚本函数](https://help.qlik.com/zh-CN/qlikview/September2026/Subsystems/Client/Content/QV_QlikView/Scripting/FileFunctions/GetFolderPath.htm)