Posts Tagged ‘Reference field’
Posted by Mark Stanger in Client scripts Monday, 3 May 2010 07:26 1 Comment
A while ago I wrote about some of the different ways to customize the autocomplete search behavior for a reference field. I saw a forum post the other day where the poster asked if it was possible to create aliases for records so that they could be searched on. For example, what if you had a CI called ‘ABC’ but everybody knew it by the name of ‘XYZ’? While support for this type of searching isn’t really built into Service-now, it is possible to add this kind of behavior to a reference field. If the CI just had a single alias, you could probably just customize the display value and do a ‘contains’ autocomplete search as described in the article previously. For this specific scenario I think that there might be a better way to accomplish the same thing.
Posted by Mark Stanger in System Definition Tuesday, 6 April 2010 07:11 4 Comments
W
hen working with reference fields, it is really important to understand how the display value for the reference field works. The display value for a reference field is what the end user actually sees when they search in a reference field to produce an autocomplete dropdown and what they can see when a reference field gets populated. Information about reference fields and reference field display values can be found here.
Some questions about display values that I hear very often are “How do I show information from more than one field for the display value?” or “Can I have different display values on 2 reference fields that reference the same table?”. The limiting factor when answering these questions is that you’re limited to a single searchable display value per referenced table. What this means is that EVERY reference field that references a particular table needs to use that table’s display value so you cannot mix and match between reference fields. There are a couple of options that can be used to provide a bit more information to the user in these scenarios however.

Recent Comments