GCX-SCR practice question 10 of 15

You can modify the data type of a variable once it has been created.

Full set: 60 questions
Answer options
A:

A. True

B:

B. False

Correct Answer:
FALSE
Explanation

In the Genesys Cloud CX scripting environment, when a variable is created, its data type (e.g., String, Numeric, Boolean) is definitively assigned. This assignment is immutable; the script editor does not permit the modification of a variable's data type after its creation. To associate a variable name with a different data type, the existing variable must be deleted and a new one created with the desired type. This design ensures type safety and consistency throughout the script's execution.

Why Incorrect

The statement "True" is incorrect because it suggests that a variable's data type is a mutable property. This contradicts the fundamental behavior of the Genesys Cloud CX scripting engine, which enforces a static data type for each variable upon its declaration. The user interface for editing a variable explicitly locks the data type field, preventing any changes.

References

1. Genesys Cloud CX Resource Center, "Add a variable to a script." This official documentation outlines the process of creating a script variable. Step 5 explicitly requires the user to "From the Data Type list, select the type of data that the variable stores." The process for editing a variable does not include a step for changing this selection, confirming its immutability after creation.

2. Genesys Cloud CX Resource Center, "Script input and output variables." This document discusses the importance of matching data types between Architect flows and scripts. It states, "When you create an input or output variable, you must select a data type... The data type for the variable in the script must match the data type for the variable in the flow." This requirement for a fixed data type contract further reinforces that the type cannot be changed dynamically within the script itself.

Scroll to Top