- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 02:41 PM
I cannot use the cmn_location table so the Select Box was an option. I need to add options to search dynamically. I tried to do this script. The script is not working for me
function onLoad() {
var fieldname = "please_select_your_professional_service_line_reporting_office_name";
g_form.clearOptions(fieldname);
g_form.addOption(fieldname, '', '-- Select a Location --');
var locations = [
'Mt Doom',
'Middle Earth',
];
locations.forEach(function(location)
{
g_form.addOption(fieldname, location, location);
});
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 06:54 PM
Hi @wyattfudal ,
your script don't have any issues.
check if the UI type of the client is set to ALL or not if not change it to All and try
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 04:18 PM
I just tried your script in my PDI and it worked fine. Have you tried putting alerts in you script so see if it is failing anywhere specific for you.
Also why can't you use csm_location by the way? Doing it via script means you would have to update the script every time a new location is added instead of getting it updated automatically when the location table is updated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 05:53 PM
They don't want me to add these none Company offices to the table. Did you use the catalog client script? I can't get it to work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2025 07:34 AM - edited 04-10-2025 08:00 AM
Yes catalog client script. Is it not working in the service portal but it is working in the standard ui? This could be an issue with the UI Type field on the client script as mentioned by @Chaitanya ILCR.
Edit: Also why not just use the choice table in the select box instead of using a script. If you are just using a select box you should see something like this when you scroll to the bottom of the page. There you can add the choices that are selectable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 05:40 PM
Different offices they don't want in cmn_location table just a isolated form. I can't get it to work. Did you use a catalog client script?