- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 04:02 PM
I have a list collector, and there is a script which displays the valid choices for the customer to choose from from a table, but some customers use the search bar to find values in the table that are not valid choices for this particular request.
Is there some code I can put in the script to remove the search bar so they only can select the choices presented to them?
(Or is there an easy way to do this and I'm just not finding it?)
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 04:30 PM
Thank you! I did search the community for "hide search list collector" and found everything but this 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 04:09 PM
Please follow the below link-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 04:30 PM
Thank you! I did search the community for "hide search list collector" and found everything but this 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 04:30 PM
Yes, it is possible using DOM manipulation, but it will only work in the old Service Catalog (which you appear to be using), not in the Service Portal. If it is possible, perhaps you could try using a reference qualifier to restrict the user's choices instead.
If you do decide to use DOM manipulation, you will want to hide the "search_row" for both sides of the list collector ("select_0" and "select_1"). Imagine your variable is named "group". Your code would look like this:
var searchbar0 = gel("group_select_0_search_row");
var searchbar1 = gel("group_select_1_search_row");
searchbar0.style.display = "none";
searchbar1.style.display = "none";
One other thing to be aware of: By default, all new client scripts have "Isolate script" set to True. You cannot use gel() without setting this to False (it is probably not visible on the form, so either add this field to the form view or edit it from the list).
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2020 04:37 PM
It does help, we recently moved to the Service Portal. I'll have to experiment with the reference qualifier and see if that serves my purpose. Thanks!