The CreatorCon Call for Content is officially open! Get started here.

Addoption with index not working in Service Portal

nandusubbu
Tera Contributor

Hi all,

i am writing a onchange catalog client script to hide/remove the options in a variable depending on selection of other variable.

I am using...

GlideForm - addOption(String fieldName, String choiceValue, String choiceLabel, Number choiceIndex)

command to remove and show options in a specific order using choice index value.

find_real_file.png

it is working fine in native UI . But not working in service portal. 

Options are removed/added as required but they are not getting added in the order i define using choice index in service portal.

Please let me know if anyone has faced this kind of issue.

We are currently using Jakarta Patch 6.

 

 

3 REPLIES 3

harshvardhan_11
Giga Expert

HI,

Did you find the solution for the same. I am facing the same issue and not able to resolve it.

Justin77
Mega Guru

We fixed this issue by using

g_form.clearOptions()

And then using g_form.addOption() to fill in our choice list.

Thanks Justin, for the help. I tried the same and its working.