How to create a search functionality in service now without using lookup select box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-13-2017 03:10 AM
Hi All,
I have the following requirement.
I want to replace the select box with a search functionality but not using a "Lookup Select box" variable type.
currently, i make some API call and get a list of VMs and append it to select box as g_form.addOption("vms", name, name); but now since the number of VM's have increased, I want to change the drop-down to search box. I could have achieved it using a Lookup select box provided I have a data coming from a database table, which is not the case.
From this :
I want this :
How do I achieve this ?? and once the above search box is ready, I need to append the result from the rest call.
Any suggestion would be appreciated.
Thanks,
Krishna P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2017 01:50 AM
Where you are creating....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2017 01:51 AM
I have a catalog item and want to have the search functionality there. Please read my original question.
Thanks,
Krishna P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2017 01:59 AM
For search functionality, there should b some data or table from where the required value will search.
so if you want to use that search functionality, its advised to use a table and store all values in that table. adding large no of values with g_form.addOption is not a good practice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2017 02:08 AM
Krishna,
Can you please clarify the below:
1. Do you have the data of VM's on sn DB?if not you don't have an option to create reference field
2. My advice is to, store the data what ever you are getting from the REST/SOAP on to a temporary table with the display field as 'XYZ' < what ever you ant to see on the selection
Let me know, if you need any help.