AnsweredAssumed Answered

ca_fdGetSelections(formId, _id) not returning selected values in CA Service Catalog Release 12.9

Question asked by nagra13 Employee on Aug 27, 2015
Latest reply on Jun 23, 2017 by sperna

Hi
We are using CA Service Catalog 12.9 version, as part of our UI development we had to capture the selected value of the Select component

The select component has a plugin mapped and the plugin is able to show the list of options, once the option is selected and the form is submitted we tried to capture the selected id and value of the option into a variable but only id is available and value is 'undefined'.

The function we used is ca_fdGetSelections(formId, _id)           

//get current selections
var selections = ca_fdGetSelections('form1', 'select1');
var i = 0;
for (i = 0; i < selections.length; i++)
{
var selection = selections[i];
console.log('id: ' + selection.id);
console.log('value: ' + selection.value);

}

Outcomes