Other Statements

The statements on this page have specific applications in Studio scripts:

  • RETURN: Terminates a function. Can pass a value from the function into the script.
  • TRACE: Outputs text to the results panel of the Snippet editor window when you use the debugger.
  • USES: Allows you to include a web service proxy DLL in the snippet.

RETURN Statements

Description: Terminates a function and optionally passes a variable from the function to the script. Use with FUNCTION statements.

Syntax: RETURN or RETURN <var>

Studio Action: Return 

Details: Must be used in the code of a function declaration. Add a variable name <var> after the RETURN keyword to pass information back into the script.

TRACE Statements

Description: Outputs text to the result panel of the Snippet editor window when you use the debugger on the Text View tab.

Syntax: TRACE "<value>"

Details: Add a TRACE keyword with any"<value>" that you want to appear in the result panel of the Snippet editor window when you use the debugger. The <value> can be a variable name. TRACE is a helpful tool to use when troubleshooting problems with your code or to help you see what's happening in the script.

This keyword is only for use in Snippet actions. You can safely leave TRACE keywords in your snippets. At runtime they are ignored outside of the debugger tool in the Snippet editor window.

TRACE "this is trace text"
//The text you specify with TRACE appears 
//In the results window when you use the 
//Debugger on the Text View tab. 

USES Statements

Description: Allows you to include a SOAP web service proxy DLL for use within the snippet. The DLL must be compiled by WISDL by NICE CXone.

Syntax: USES "<proxy>.dll"

Studio actionUses

Details: To use a USES statement, the proxy DLL must be located in the root folder of your business unit'sClosed High-level organizational grouping used to manage technical support, billing, and global settings for your CXone environment file server. You can view the files in your business unit on the Browse ACD Files page in CXone.

Learn More: You can learn more about using web service proxies with Studio scripts on the API Calls from SNIPPET Actions help page.