- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 06:26 PM
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
Service Portal View
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.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 06:37 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 06:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 06:33 PM
no. I have set the UI type to Desktop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 06:35 PM
Satheesh is correct,
You need to change the UI Type to "All" so it runs on both Desktop and Mobile / Service Portal. Change it the UI Type to "All" and you should be good to go.
Brent
P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-18-2018 06:37 PM