- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 03:45 PM
On one of our catalog items on our Service Portal we would like to make it so the reference field for the configuration item only shows the CI's assigned to the user or a CI with an exact match. I understand how to get the list to only show CIs assigned to the logged in user but is there a way to only show CIs assigned to the logged in user AND a CI that's an exact match to what the user has typed?
Thank you,
Mitchell
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 06:37 PM
Hello,
The reference field's search uses typeahead search or live search, which means it will start showing the values when you start typing and will filter lists accordingly. So, it won't wait to find exact search till the user has typed the full CI name, hence you can't specify the full exact search filter.
As you already mentioned, you can use reference qualifier to show only those CIs assigned to the logged in user. But showing the exact search match is not possible as internally service-now is going to use "starts with" or "contains" query based on what you have typed (included * wildcard or not).
It is not possible using the out of the box reference field. However one solution that I can think for your scenario is:
- Have reference qualifier applied to your reference field, so that it shows only those CIs which are assigned to the logged in users
- Have a check-box to ask if the CI was not found in the above reference look-up list. If they select yes, it was not found, then show another plain text field to have them enter the CI name
- The plain text box shows up when the CI was not found in the reference list, and they can enter the CI name there. You can use onchange validation on that plain text variable, to see if it is an exact match from CMDB or not, if not show an error that it doesn't match with any CI names in the CMDB.
Hope this helps!
Cheers,
Manish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 04:23 PM
Try this in the reference qualifier.
Update YOUR_DESSIRED_CI_NAME with the name of the CI
javascript:'assigned_to='+gs.getUserID()+'^ORname=YOUR_DESSIRED_CI_NAME'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 04:42 PM
Thanks for the reply! However, I am trying to find an exact match to what the customer has typed in the reference field not what one that I have preset.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 04:49 PM
I'm not sure if the below will work or not.
Give it and try
javascript:'assigned_to='+gs.getUserID()+'^ORname='+current.variables.YOUR_VRIABLE_NAME

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2019 06:37 PM
Hello,
The reference field's search uses typeahead search or live search, which means it will start showing the values when you start typing and will filter lists accordingly. So, it won't wait to find exact search till the user has typed the full CI name, hence you can't specify the full exact search filter.
As you already mentioned, you can use reference qualifier to show only those CIs assigned to the logged in user. But showing the exact search match is not possible as internally service-now is going to use "starts with" or "contains" query based on what you have typed (included * wildcard or not).
It is not possible using the out of the box reference field. However one solution that I can think for your scenario is:
- Have reference qualifier applied to your reference field, so that it shows only those CIs which are assigned to the logged in users
- Have a check-box to ask if the CI was not found in the above reference look-up list. If they select yes, it was not found, then show another plain text field to have them enter the CI name
- The plain text box shows up when the CI was not found in the reference list, and they can enter the CI name there. You can use onchange validation on that plain text variable, to see if it is an exact match from CMDB or not, if not show an error that it doesn't match with any CI names in the CMDB.
Hope this helps!
Cheers,
Manish