- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 12:10 AM
Hi All,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 12:31 AM
Hi @chandan31 ,
You might be facing difficulties with usage of inverted commas.
Try:
g_form.addOption("relation", "Marriage_Spouses","Marriage- Spouse's siblings");
g_form.addOption("relation", "Condolence_Spouses","Condolence- Spouse's parents");
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 12:24 AM
in question you are saying removeOption is not working
but the script you are sharing is for addOption()
Ensure you check docs and use valid syntax for both the functions
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 12:26 AM
Hi ,
Sorry from my side it is AddOption not removeOption
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 12:31 AM
Hi @chandan31 ,
You might be facing difficulties with usage of inverted commas.
Try:
g_form.addOption("relation", "Marriage_Spouses","Marriage- Spouse's siblings");
g_form.addOption("relation", "Condolence_Spouses","Condolence- Spouse's parents");
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2024 12:33 AM
Hello @chandan31,
It seems there might be an issue with the single quotes within the strings in your script. Try using double quotes inside the strings to avoid conflicts and also decide whether you want to use add/remove option and modify it accordingly.
Please try with the script below and let me know how it works for you.
g_form.addOption("relation", "Marriage_Spouses", "Marriage- Spouse's siblings");
g_form.addOption("relation", "Condolence_Spouses", "Condolence- Spouse's parents");
Let me know your views on this and Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Aniket