Jump to: navigation, search

Assign Block Common

Use the Assign common block to assign a computed value/expression or an entered value to a variable.  

See the Query Services block Service Data property for an example of using the Assign block and Expression Builder to parse a JSON string and assign the service data to a variable.

Note: Function getSIPHeaderValue(headername) returns the SIP header value associated with the given SIP headername. You may wish to use this function with the Assign block.

The Assign block has the following properties:

Name Property

Find this property's details under Common Properties for Callflow Blocks or Common Properties for Workflow Blocks.

Block Notes Property

Find this property's details under Common Properties for Callflow Blocks or Common Properties for Workflow Blocks.

Assign Data Property

This property assigns a value (expression) to a variable. You select the variable and then enter an expression, either a literal or one created in Expression Builder.

To select a variable and assign a value:

  1. Click the Assign Data row in the block's property table.
  2. Click the OpenDialogBoxButton.gif button to open the Assign Data to Variables dialog box.
  3. Click in the Variable field to display a down arrow.
  4. Click the down arrow and select a variable whose value will be evaluated to determine the branching condition. Default application variables are described in the Property Entry block for voice applications and the Property Entry block for routing applications. You can also use a custom variable.
  5. Click under Expression to display the OpenDialogBoxButton.gif button.
  6. Click the OpenDialogBoxButton.gif button to open Expression Builder. For examples of how to use Expression Builder, see the Expression Builder topic.
  7. Select an operator for the branching condition.Your variable's value will be equal to (==), less than (<), greater than (>). less than or equal to (<=), greater than or equal to (>=) or not equal to (!=) to value you enter in the Expression field.
  8. In the Expression field, create a value to compare to the variable's value. Enclose the value in single quotes ('  ').
  9. Click the ValidateExpBut.gif button to validate the expression. Syntax messages appear under the Expression Builder title.
  10. Click OK to close Expression Builder and return to the Assign Data to Variables dialog box.
  11. You can make multiple variable/value assignments. Click the Add button if you wish to add more assignments and repeat the steps above.

Editing Expressions

To edit an expression:

  1. Click its row under Expression in the Assign Data to Variables dialog box. This causes the OpenDialogBoxButton.gif button to appear.
  2. Click the OpenDialogBoxButton.gif button to re-open Expression Builder where you can edit the expression.

Exceptions Property

Find this property's details under Common Properties for Callflow Blocks or Common Properties for Workflow Blocks.

  • For callflows, invalid ECMAScript expressions may raise the following exception event: error.semantic.
  • For workflows, invalid ECMAScript expressions may raise the following exception events: error.script.SyntaxError, and error.script.ReferenceError.

You can use custom events to define the ECMAScript exception event handling.

Condition Property

Find this property's details under Common Properties for Callflow Blocksor Common Properties for Workflow Blocks.

Logging Details Property

Find this property's details under Common Properties for Callflow Blocks or Common Properties for Workflow Blocks.

Log Level Property

Find this property's details under Common Properties for Callflow Blocks or Common Properties for Workflow Blocks.

Enable Status Property

Find this property's details under Common Properties for Callflow Blocks or Common Properties for Workflow Blocks.

This page was last edited on November 4, 2013, at 17:36.
Comments or questions about this documentation? Contact us for support!