Skip to main content
Version: 7.9

system.util.getSystemFlags

This function is used in Python Scripting.

Description

Returns an integer that represents a bit field containing information about the currently running system. Each bit corresponds to a specific flag as defined in the bitmask below. The integer return will be a total of all of the bits that are currently active. See the example for tips on how to extract the information in this bit field. Note that the tag [System]Client/System/SystemFlags contains the same value.

FlagFlag DescriptionBit Value
Designer FlagSet if running in the Designer.1
Preview FlagSet if running in the Designer, and the Designer is in preview mode.2
Client FlagSet if running as a Client.4
Webstart FlagSet if running as a Client in Web Start mode.8
Applet FlagSet if running as a Client in Applet mode.16
Fullscreen FlagSet if running as a Client in full screen mode.32
SSL FlagSet if communication to the Gateway is encrypted with SSL.64
Mobile FlagSet if currently running a mobile-launched client.128
Staging FlagSet if running a staging client.256

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.getSystemFlags()

Parameters

None

Returns

int - An total of all the bits that are currently active. A full screen client launched from the gateway webpage with no SSL will have a value of 44 (Fullscreen flag + Webstart Flag + Client Flag).

Scope

Client

Code Examples

Example #1
# The first part of the script will take the integer representing the system flags, convert it to bits, and place it in a list and then print it out.
# The second part of the script will take the list of bits, and place it in a table showing what each of the bits represent.

myList = []
flags = system.util.getSystemFlags()
for i in range(8,-1,-1):
myList.insert(0, flags >> i & 1)
print myList

headers = ["Designer Flag", "Preview Flag", "Client Flag", "Webstart Flag", "Applet Flag", "Fullscreen Flag", "SSL Flag", "Mobile Flag", "Staging Flag"]
data = system.dataset.toDataSet(headers, [myList])
table = event.source.parent.getComponent("Table")
table.data = data