VariablePoolQuestionSetJS - Scoped

VariablePoolQuestionSetJS API enables you to use Variable Pool Question Set. To use this class in a scoped application, use the sn_sc namespace identifier. The Service Catalog Scoped API plugin (com.glideapp.servicecatalog.scoped.api) that is enabled by default is required to access the VariablePoolQuestionSetJS API.

VariablePoolQuestionSetJS - VariablePoolQuestionSetJS()

Creates an instance of the VariablePoolQuestionSet class.

Table 1. Parameters
Name Type Description
None

Example:

var variablePool=new sn_sc.VariablePoolQuestionSetJS();

VariablePoolQuestionSetJS - getFlatQuestions()

Returns the array of questions associated with the cart item ids specified.

Table 2. Parameters
Name Type Description
None
Table 3. Returns
Type Description
Object Object pointing to the current cart details.

Example:

var cart=new sn_sc.VariablePoolQuestionSetJS();	
	cart.setCartID("9bf16afb87110300318d05a888cb0b49");
	cart.load();
	console.log(cart.getFlatQuestions());

Output:

  .	displayValue
:
""
sys_id
:
"90b72d4b4f7b4200086eeed18110c701"
type
:
7
value
:
""
__proto__
:
Object

	.	1
:

	.	displayValue
:
""
sys_id
:
"a8b72d4b4f7b4200086eeed18110c701"
type
:
7
value
:
""
__proto__
:
Object

	.	2
:

	.	displayValue
:
""
sys_id
:
"a8b72d4b4f7b4200086eeed18110c702"
type
:
2
value
:
""


VariablePoolQuestionSetJS - load()

Loads the question set.

Table 4. Parameters
Name Type Description
None
Table 5. Returns
Type Description
void

Example:

var cart=new sn_sc.VariablePoolQuestionSetJS();	
	cart.load();

VariablePoolQuestionSetJS - setCartID(String id)

Sets the cart item ids of the variable pool.

Table 6. Parameters
Name Type Description
id String
Table 7. Returns
Type Description
void

Example:

var cart=new sn_sc.VariablePoolQuestionSetJS();	
	cart.setCartID("9bf16afb87110300318d05a888cb0b49");