How do we get the display value of reference cells in the multi-row variable set? i.e instead of displaying the sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2019 03:28 AM
How do we get the display value of reference fields in the multi-row variable set? i.e instead of displaying the sys_id.
I tried getDisplayValue() but it is giving as undefined.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 02:53 PM - edited 11-07-2024 02:55 PM
Did you end up having any success with this?
I also had issues with reference fields in a multi-row variable set since it would only return the sys_id. I finally realized I could switch the variable to a Lookup Select Box, pick the table, and select specifically which field I wanted for the value and which field I wanted for the display. You also update the variable attribute so they can still search by adding 'is_searchable_choice=true' and check the box to enable the -- none -- option by default.
....If you had some conditions on your reference variable, switch the reference qualifier to advanced real quick and copy the code. You'll put that under the ref_qualifier field when you switch it to a lookup select box.
I got part of the idea from the solution provided to this question: https://www.servicenow.com/community/developer-forum/display-3-variables-value-in-lookup-select-box-...
Here's an example variable: