Catalog Client Script does not execute from Service Portal

Ilamaaran
Kilo Contributor

I recently built a catalog item form to populate a value in a text field based on previous field values (multiple fields involved). when I preview the catalog item form by clicking the Try It button, the scripting works properly and I can see the desired results. However, when I am trying to view the form from Service Portal, the script doesn't run and the values are not populated. I don't understand what causes this issue. 

Has anyone gone through same issue? Please advice how to get this working? 

Here are the screenshots of the forms from Preview and Service Portal view

Preview from Catalog Item Try It button

find_real_file.png

 

Service Portal View

 

find_real_file.png

 

This is the script I have written to populate the values

 

function onChange(control, oldValue, newValue, isLoading)

{

if (isLoading || newValue == '')

{

return;

}


var tier;

tier = g_form.getValue('ConcatenateFields');

if (tier=='HighHighHigh')


{

g_form.setValue('TierClassification',"Tier 1");

}

else


{

g_form.setValue('TierClassification',"Invalid");

}


}

 

Note - the "concatenatefields" is another hidden field where I have concatenated all the three values selected in the selectedbox.

1 ACCEPTED SOLUTION

You have to make ui type to All to make that script working in all places. Make this change and your script will be working THANKS, SATHEESH

View solution in original post

5 REPLIES 5

Thanks. It works. Sorry, am a beginner - this might be a basic thing but I have just started to work without any prior knowledge or training..