- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 08:49 AM
Hi Team,
* I have created a variable for a record producer which is referring to "sys_choice" table and populating it in the front end
* I have created a onChange Catalog Client Script to remove couple of choices based what I select from the drop down, for the previous variable
Unfortunately the g_form.removeOption() method which I am using is not working at all!
Can someone please guide me as to what is the issue? I have also tried with g_sc_form.removeOption() but isn't working.
Attached is the screen shot for your reference.
Thanks and Regards
Saurabh
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 03:26 AM
Glad! You can mark an answer as correct and helpful if it solved your query. So that it benefits future visitors as well.
Regards,
Sumanth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 08:56 AM
Hi Saurabh,
g_form.removeOption() will not work on reference variables.
That will work only for select box.
Mark as correct and helpful if it solved your query.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 12:51 AM
Hey Sumanth,
So what could be an alternative then? Can g_form.addOption() work?
Regards,
Saurabh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 01:37 AM
Nope. Both addOption and removeOption will not work for reference fields.
For reference fields, you need to have a reference qualifier which will control the records shown in reference field based on other field.
You can check this link and see if it will help you.
If you are not able to set the reference qualifier, let me know your requirement so that I can help you with it.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2022 02:44 AM
Hey Sumanth,
Thank you so much for your reply!
My requirement is that I should be able to remove the values/or add them ( vice-versa )based on what I select from the above variable field.
The above field has multiple drop down options but let say for three of them, I should be able to add/remove the values from the second field accordingly.
Regards,
Saurabh