is there a way to sort the options that we add to a list with g_form.addOption()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2014 03:11 AM
is there a way to sort the options that we add to a list with g_form.addOption()?
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2014 03:38 AM
Hi Vikrant,
you can use choiceindex method to sort the value.refer section 12.1 "GlideForm (g form) - ServiceNow Wiki"
regards harish
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2014 05:06 AM
Thanks Harish, But the option let to you add an option in a particular index but not help you sort the list.
Thanks again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2014 05:17 AM
ohh..then u have to remove the option add it again..i din fin any solution fo that.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2014 01:38 AM
Thanks Harish, but I am bit afraid I didn't understand remove and add it again. I have applied a script on some variables on a service catalog, which are dependent on each other and present a certain list of options depending on the option selected on the first one. I have been searching and couldn't find any way around how I might be able to sort the list criteria.
I hope that provide more information?