g_form.getElement('it_group').options not working in service portal;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 01:42 AM
Hi,
I have a catalog client script that changes all the options of a field based on the selection in another field. Initially the script was using g_form.getElement('it_group').options; but now it's not working in SP. Below the script :-
var manuf=g_form.getElement('it_group').options; // Extracts list of options in a drop-down field. ( This is not working in service portal )
for(i=0;i<manuf.length;i++)
options.push(manuf[i].value);
g_form.clearOptions('it_group');
g_form.addOption('it_group','',"-- None --");
for(i=0;i<options.length;i++)
if(options[i].indexOf('-'+loc)>=0||options[i].indexOf('-AMK')>0)
g_form.addOption('it_group',options[i],options[i]);
How to extract the list of options available in a drop-down field which should work in service portal.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2018 03:03 AM
Hi
There is no way to do this - it is not supported. Here is a list of supported g_form functions. You can only add, remove and clear options in a dropdown.
You need to rethink your design.