The Client Namespace exposes the state of one connected client station to .NET scripts. Use @Client to reference the namespace, followed by the accessors listed below.
Every connected client has its own instance, so values such as the signed-in user, the culture, the visible display and the device flags describe that client. The namespace is available in Display Code Behind, in Dynamic Properties applied to UI elements, and in expressions.
Display objects themselves (Open, OpenModal, NewPopup, Close, custom properties, zoom and scroll state) belong to the Display Namespace.
Child Namespaces
Sub-namespaces grouping related client state. Reach each via its qualified path.
Path | Description |
|---|---|
| Connection metadata (computer name and IP, local or remote, web browser or Smart Client), logon operations, password management, geolocation, and the mobile capture methods. See the Client.Session Members section below. |
| User-interface state (current page, layout, navigation history, tooltip options, simulation mode) and the methods to open, close, print and navigate displays. |
| The currently selected asset (name, path, ISA-95 level names and IDs) plus per-client general-purpose values ( |
| The workstation's current date and time together with year, month, day, hour, minute, second and |
| Per-client alarm-view filters, selected area, date range and the page-level acknowledge-all trigger that drives the default Alarm Viewer. |
| Per-client trend-chart state and operations (active pen set, time range, cursor position) that bind to TrendChart display controls. |
| Per-client drilling-chart state and operations that bind to DrillingChart display controls. |
| Read-only, case-insensitive view over the parsed query string or command-line arguments delivered to the client at startup. Values are URL-decoded, and the indexer returns null for absent keys. |
| Reference to the client message queue. |
Client Members
Direct properties and methods on @Client.
Member | Kind | Type | Description |
|---|---|---|---|
| Property |
| Gets or sets whether this client's alarm beep is currently silenced. Set to true to stop the local beep for the duration of the unacknowledged alarm condition. A subsequent new alarm re-raises the beep unless it remains suppressed. |
| Property |
| Gets or sets the client's culture, for example |
| Property |
| Gets the client's current user as a reference to the Security user object. |
| Property |
| Gets or sets the name of the active localization dictionary used to translate text shown on displays and in messages. Empty selects the solution's default dictionary. Use |
| Property |
| Gets or sets the page name selected in the built-in SelectPage dialog. Set from script to preselect an entry before the dialog is shown. |
| Property |
| Gets or sets the active visual theme dictionary name for this client, controlling display colors, brushes and fonts. Setting this property applies the theme immediately if the visualization service can resolve the named theme. |
| Property |
| Gets or sets the name of the engineering-units dictionary applied when rendering tag values on displays. Empty selects the solution default. Use this to switch between unit systems, for example metric and imperial, at runtime per client. |
| Property |
| Gets the name of the user currently signed in on this client station, as recorded by the Security module on the most recent successful logon. Empty when no user is signed in. The built-in Guest user shows as |
| Method |
| Asynchronously changes a runtime user's password after validating the current password. Prefer |
| Method |
| Asynchronously changes a runtime user's password and returns a detailed status code through the |
| Method |
| Returns the live TDisplay instance for the named open display on this client. Use to drive ad-hoc XAML manipulation, find named elements, or inspect display state from script. Returns null when the display is not open or the visualization service is unavailable. |
| Method |
| Returns every TDisplay instance currently open on this client, including the main panel, popups and secondary panels. Returns an empty array when no displays are open. |
| Method |
| Translates a string through the active localization dictionary. Returns the translated text for the client's current culture, or the original string when no entry matches. |
| Method |
| Asynchronously signs the client in with the supplied credentials, replacing any currently signed-in user. On success, clears the login dialog's input fields and updates the session's logon timestamp. Returns 0 on success, or a non-zero security error code. |
| Method |
| Asynchronously signs the client in as the built-in Guest user, replacing any currently signed-in user. Updates the session's logon timestamp and resets the inactivity clock. Returns 0 on success. |
| Method |
| Asynchronously signs the client in through OIDC federated sign-in, delegating authentication and any MFA enforcement to the configured Identity Provider. See Federated sign-in below for the per-client return-value contract. |
| Method |
| Opens the named display in this client's main panel, the simplest navigation entry point. When the name ends in |
| Method |
| Opens a configured layout on the client, replacing the current layout. The layout's defined initial displays are loaded into their respective panels. |
| Method |
| Launches this client's web-display front end against the runtime server. Pass |
| Method |
| Opens an arbitrary URL in this client's web view or external browser. The URL must include the scheme. Returns 0 on success, or non-zero on launch failure. |
Federated sign-in
@Client.LogOnSSOAsync is the supported entry point for OIDC sign-in on every client flavor. On Rich Client and Smart Client it launches the system browser, listens on a loopback port for the Identity Provider redirect, exchanges the PKCE-protected authorization code for an id_token, and binds the runtime session. On the HTML5 Web Client the same call drives the server-side OIDC start handler, preferring a popup and falling back to navigating the current tab.
The return value differs by client, because the two legs differ. On Rich Client and Smart Client, 0 means the sign-in completed. On the HTML5 Web Client, 0 means the sign-in completed when the popup path ran, but only that navigation started when the popup was blocked and the same-tab fallback took over. Do not write if (rc == 0) { /* logged in */ } in a Display that also runs on the web client.
The same-tab fallback needs a return leg: the callback redirects back with ?identityToken=<GUID>, and a Display Code Behind reads @Client.QueryParams["identityToken"] and calls @Security.LogOnWithTokenAsync to bind the session. Pass that value through unchanged. The popup path needs no return leg.
// Rich Client / Smart Client Code Behind
int rc = await @Client.LogOnSSOAsync(); // single Active OIDC provider
int rc = await @Client.LogOnSSOAsync("EntraID"); // explicit provider
if (rc != 0) @Client.UI.ShowMessageBox("SSO failed: " + rc);
// HTML5 Web Client return leg, needed only for the same-tab fallback
string token = @Client.QueryParams["identityToken"];
if (!string.IsNullOrEmpty(token))
await @Security.LogOnWithTokenAsync("EntraID", token);
Client.Session Members
Per-client session state reached as @Client.Session. Each connected client has its own instance, so these values describe that client: its address, host platform, connection origin, inactivity timer, and loaded-tag counters. The methods operate against the Security module on that session's behalf.
Session properties
Member | Type | Description |
|---|---|---|
|
| Gets the IP address of the client workstation as reported to the server at connection time. |
|
| Gets the network name of the client workstation as reported to the server at connection time. |
|
| Gets the current location horizontal accuracy, in meters. Available on mobile devices when running in the Mobile App client. |
|
| Gets current location advanced information. Available on mobile devices when running in the Mobile App client. |
|
| Gets the current location latitude. Available on mobile devices when running in the Mobile App client. |
|
| Gets the current location longitude. Available on mobile devices when running in the Mobile App client. |
|
| Flag indicating the client is running on Android. |
|
| Flag indicating the back button is visible on iOS. |
|
| Gets whether this client session is currently connected to the Runtime server. True while the underlying TCP or web channel is alive, false while disconnected or reconnecting. |
|
| Flag indicating the client is running on iOS. |
|
| Flag indicating the client is running on an iPad. |
|
| Flag indicating the client is running on an iPhone. |
|
| Gets whether this client session is running on the same machine as the Runtime server (loopback or local connection). Inverse of |
|
| Gets whether this client session is running on a different machine than the Runtime server (network connection). Inverse of |
|
| Gets whether this client session is running as a Smart Client, a locally installed client that connects to the Runtime server over TCP. |
|
| Flag indicating the client is running on a smart device. |
|
| Flag indicating the smart device is in portrait orientation. |
|
| Gets whether this client session is running inside a web browser (HTML5 client) rather than the native Windows or mobile runtime. |
|
| Gets the date and time of the last logon on this session. |
|
| Gets the count of tag properties (Value, Min, Max, Quality and others) loaded into memory by this client session. Typically a multiple of |
|
| Gets the count of tags loaded into memory by this client session. Useful for memory-footprint diagnostics on large solutions. |
|
| Gets the startup parameters passed to this client session, typically the query-string portion of the launch URL for web clients, or command-line parameters for Smart Client launches. |
|
| Gets the HTTP or HTTPS URL this client uses to reach the Runtime server, for example |
|
| Flag indicating the status bar is visible on iOS. |
|
| Gets the elapsed time since the last user input on this client (keyboard, mouse, touch). Used by auto-logoff logic and screen-saver triggers. |
|
| Gets the client's user name. |
Session methods
Member | Type | Description |
|---|---|---|
|
| Asynchronously captures a photo using the device camera and returns the JPEG bytes. See Mobile capture methods below. |
|
| Asynchronously changes a runtime user's password after validating the current password. Parameters: |
|
| Asynchronously changes a runtime user's password and returns a detailed status code through the |
|
| Asynchronously retrieves the password hint configured for a runtime user. Parameter: |
|
| Opens the solution's built-in LogOn display, blocking navigation until the user completes or cancels the login. Convenience helper for putting a Log on button on a display. Returns 0 on a successful login, or a non-zero security error code. |
|
| Asynchronously logs the client session on as the built-in Guest user, replacing any currently signed-in user. Updates |
|
| Asynchronously scans a code of any supported format, optionally restricted by a format hint. See Mobile capture methods below. |
|
| Asynchronously scans a 1D barcode using the device camera. See Mobile capture methods below. |
|
| Asynchronously scans a QR Code using the device camera. See Mobile capture methods below. |
|
| Asynchronously marks a runtime user as blocked or unblocked. Blocked users cannot log on, but their account and audit history are preserved. Parameters: |
|
| Asynchronously marks a runtime user as deleted (soft delete) or restores a previously soft-deleted user. The user row remains in the runtime database and only the visibility flag changes. Parameters: |
Mobile capture methods
Four session methods drive the device camera. All four are available only when the HTML5 client is hosted inside the Mobile App. In any other context, including a plain browser, the WPF Rich Client, and server-side scripts, they return null. They also return null when the user denies camera permission, cancels the capture, or the device has no camera.
Always null-check the result before using it. A null return is the normal outcome of a cancelled scan, not an error condition.
Signature | Returns | Usage |
|---|---|---|
|
| Captures a photo and returns the JPEG bytes. Use for operator evidence attached to a work order, an inspection record or an alarm acknowledgement. Write the bytes to a Dataset file field or to disk; the method does not persist anything itself. |
|
| Scans a QR Code and returns the decoded text. Use for asset tags that carry a URL or a structured payload, and for equipment labels that map to an asset path in the Unified Namespace. |
|
| Scans a 1D barcode and returns the decoded text. Supported symbologies are Code128, Code39, Code93, EAN, UPC, ITF and Codabar. Use for inventory, batch and material identifiers already printed as linear barcodes. |
|
| Scans a code of any supported format, 1D or 2D, optionally narrowed by the |
The format hint on ScanAnyCodeAsync is case-insensitive. Pass an empty string or null to accept every supported format. Combine multiple values with ,, ; or |, for example "QR,Code128,EAN13". Recognized tokens:
"","All","Any": every supported code. This is the default."1D","Barcode","OneDimensional": every 1D barcode."2D","TwoDimensional": every 2D code (QR, Data Matrix, Aztec, PDF417, MaxiCode)."QR","QRCode": QR codes only.- Specific 1D formats:
"Code128","Code39","Code93","EAN13","EAN8","UPC-A","UPC-E","ITF","Codabar","Rss14","RssExpanded". - Specific 2D formats:
"DataMatrix","Aztec","Pdf417","MaxiCode".
Unknown tokens are ignored. If no recognized token resolves to a format, the scanner accepts every supported format.
// Scan an asset tag and navigate to the matching display
string code = await @Client.Session.ScanQRCodeAsync();
if (!string.IsNullOrEmpty(code))
@Client.OpenDisplay(code);
// Accept either a QR Code or a Code128 barcode
string id = await @Client.Session.ScanAnyCodeAsync("QR,Code128");
// Capture operator evidence
byte[] photo = await @Client.Session.CapturePhotoAsync();
if (photo != null)
System.IO.File.WriteAllBytes("C:\\Evidence\\capture.jpg", photo);
Relocated Members
Several members that were once reached directly on @Client now live on a child namespace. The old paths still resolve for compatibility, and they are hidden from the Designer's IntelliSense so that new solutions are written against the current path. Use the right-hand column.
Old path | Current path |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
@Client.SwitchToStandby, @Client.Session.SwitchToStandby, @Client.ControlWithFocus, @Client.StatusBarVisibleOnIOS and @Client.IsBackButtonVisibleOnIOS are retired and no longer carry behavior. The iOS status-bar and back-button flags remain available on @Client.Session.
Internal and Auxiliary Members
These members exist on @Client but back the product's own dialogs and diagnostics. They are hidden from the Designer's IntelliSense and are listed here for completeness. Solution scripts should not depend on them.
Member | Type | Description |
|---|---|---|
|
| Requests a .NET garbage collection. Rich Client only. |
|
| The names of the identity providers this client may sign in with, taken from every Active OIDC row in |
|
| The identity provider the operator picked in the logon window, one of the names in |
|
| Auxiliary variables used by the system default logon window. |
|
| Client lifecycle state and triggers. |
|
| The launch parameters string for this client. Use |
|
| Client state flags. |
|
| Current cursor coordinates, optionally in screen coordinates. |
|
| Backing accessors for |
|
| Adds a display to this client's cache list. |
| various | Platform plumbing for the OIDC sign-in flow. Scripts call |
Member set verified against the FrameworX 10.1.5 runtime source (ClientStation and ClientSession). For the full .NET API surface see the external Client Namespace .NET API Reference.
In this section...