🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators RemoteTurnkeyGetStringValue
This page was created by Stephanie on 2025-01-09. Last edited by Wikiadmin on 2026-07-29.

Use RemoteTurnkeyGetStringValue when your ViewModel workflow needs to obtain a string value from a remote Turnkey session.

Purpose

RemoteTurnkeyGetStringValue is an OCL operator in the Remote Turnkey operator group. Use it after your workflow has established and is working with a remote Turnkey session, when the value you need is text.

For example, a remote workflow may need to read a text result, identifier, message, or other string value produced by the remote session before continuing with local logic.

Before you use the operator

Make sure that your OCL expression runs in the correct ViewModel context and that the remote Turnkey session is still available. A remote session that has already been closed cannot be used to retrieve additional values.

A typical remote-session workflow is:

  1. Establish and retain the remote Turnkey session using the session-opening mechanism configured for your application.
  2. Run work in that session with RemoteTurnkeyExecuteAction.
  3. Retrieve a text result with RemoteTurnkeyGetStringValue.
  4. Use the returned text in the remaining OCL logic.
  5. Release the session with RemoteTurnkeyCloseSession when no more remote work is required.

Choosing the result type

Use this operator only when the remote value is expected to be a string.

If the remote result is Use
Text RemoteTurnkeyGetStringValue
Binary content, such as a file payload RemoteTurnkeyGetByteArray

For example, retrieve a text response as a string before applying string operations such as length or ToCharArray. Do not use the string-value operator for binary data; retrieve binary data with RemoteTurnkeyGetByteArray instead.

Use the returned text

After retrieval, treat the result as a string in your OCL expression. The next operation depends on what the remote action returned:

  • Use length when you need the number of characters in the returned text.
  • Use ToCharArray when you need an ordered collection of individual characters.
  • Use Parse when the returned text must be converted or interpreted by parsing logic.

For example, if a remote action returns a status message, you can retrieve it as a string and use its length to decide whether the message contains text. The exact expression depends on the operator's configured signature and the session variable used by your application.

Session lifecycle

Keep the remote session open until you have retrieved every value needed by the local workflow. Then close it with RemoteTurnkeyCloseSession.

Do not close the session before calling RemoteTurnkeyGetStringValue. Conversely, do not keep a session open after the workflow has completed only to retain a value that should already have been copied into local OCL state.

Syntax and parameters

The available source material does not define the call signature, parameter order, return behavior, or error behavior for RemoteTurnkeyGetStringValue. Confirm these details in the MDriven Designer expression assistance or with your MDriven support contact before adding the expression to a production ViewModel.

See also