Return

This help page is for Desktop Studio. This information is also available for Studio.

別のスクリプトでRunsubによってトリガーされた添字を完了します。 ReturnReturnValue プロパティに 1 つの値を格納し、その値を添え字を呼び出したスクリプトに返します。 ReturnValue は、RunsubアクションのReturnVariableプロパティに格納されます。

Returnは、常にメインスクリプトにコントロールを戻す必要があります。 ベストプラクティスは、サブスクリプト中にスクリプトを終了させないことです。

サポートされているスクリプトタイプ

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

The icon for the Digital script type - a computer monitor with a smartphone next to it.

一般

Eメール チャット 電話 ボイスメール ワークアイテム SMS デジタル

入力プロパティ

これらのプロパティは、アクションが実行時に使用するデータを定義します。

プロパティ

説明

Caption

スクリプト内でこのアクションを一意に識別できる、短いフレーズを入力します。 アクションアイコンにカーソルを合わせるとキャプションが表示されます。 The default is the action name.

ReturnValue

メインスクリプトに渡したい値を保持する変数。 この値は、メインスクリプトのReturnVariable Runsubactionのプロパティに格納されます。

結果分岐条件

なし

ヒントとコツ

ReturnValueには、配列またはダイナミックデータオブジェクトを指定することができます。 ダイナミックデータオブジェクトを使用する場合は、asjson()またはasxml()関数を使用してJSONまたはXMLに変換してください。 そうすれば、JSONやXMLを1つの文字列値としてメインスクリプトに渡すことができます。 メインスクリプトでは、値をダイナミックデータオブジェクトに戻すことができます。

スクリプトの例

これは、このアクションをスクリプトでどのように使用できるかを示す例です。 完全なスクリプトではありません。 追加のスクリプト作成が必要な場合があります。

以下の例は、メインスクリプトに値を返すために3つのReturnアクションを使用するサブスクリプトです。

このスクリプトをダウンロードしますか?