Change Text Shown for No Results in Search

170
3
11-22-2019 07:43 AM
mpboyle
Regular Contributor

When a search result is not found, the highlighted text is shown.  Is this text string stored in a file somewhere where it can be altered?  We've had a request to include specific contact information if this occurs.  Or...can a javascript file be written to append text to the end?

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Matthew,

   That default string comes from the JS API.

noResultsFound: "There were no results found for ${value}."

require(["dojo/i18n!esri/nls/jsapi"], function(b) {
  b.widgets.Search.main.noResultsFound = "blah blah ${value}.";
});‍‍‍
0 Kudos
mpboyle
Regular Contributor

So if I wanted to change this, is this bit located in a file somewhere within the WAB structure?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

No you have to add it. Like in the search widget startup function.

0 Kudos