Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Where Does the match Object in Typeahead Template Come From?

147mahesh25
Tera Contributor

 

Hi Community,

I'm working on a custom widget for a ServiceNow catalog search. I'm using a typeahead template in the search source, and I came across this snippet:

 

html
 
 
 

 

I would like to understand:

  1. What is the match object?
  2. Where does it come from in the context of ServiceNow typeahead templates?
  3. How is it connected to the search sources?

For reference, I'm working with a search source in a ServiceNow Service Portal widget. Any guidance or documentation links would be greatly appreciated!

Thank you in advance for your help!

2 REPLIES 2

147mahesh25
Tera Contributor

Got the answer it is an single searched item on an search results before submission of query which is used to show typeahead search suggestions to users 😀 

@147mahesh25 in this object there is "label" property that contains (I think) the display value of the record. However I am wondering how to access other fields like short description, etc. Any clue? Thanks in advance.