Sorting List Collector variable values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 08:15 AM
Hello,
We have a software list collector that contains 'Other'. The list currently sort by alphabetical order. Is it possible to move the 'Other' value to the bottom of the list? Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 08:26 AM - edited 10-26-2023 08:26 AM
Hi,
Cant think if a straightforward way to do it.
What I would do is remove other altogether and have a checkbox which says 'Cant find the software you need', as soon as the user checks it I would populate this question (in your screenshot) with 'Other'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 09:20 AM
Thank you @Anurag Tripathi for your great suggestion. I had previously considered this option and offered it to the users, but they preferred to have the 'Other' value displayed in the list collection. This is why I am seeking assistance from the community.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 09:27 AM - edited 10-26-2023 09:27 AM
Try this, it might work
In an onload client script
if(g_form.getValue('<variable name>') != '')
{
g_form.removeOption('<variable name>','<value of other>');
g_form.addOption('<variable name>','<value of other>','Other');
}
When it a new choice is added it usually goes at the end of the list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 09:41 AM
Is the following code looks right. If it does, then that did not work.
if(g_form.getValue('software_name') != '')
{
g_form.removeOption('software_name','Other');
g_form.addOption('software_name','Other','Other');
}