TroyP0581187515
ServiceNow Employee
Options
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
Wednesday
You can change the search box text on the search widget where AI is enabled (i.e. ctrl + right click > instance options) by changing the “placeholder” field.
However, if you would like to include a dynamic value such as current logged on user's name, for example:
Create a UI message in the classic view: All > System UI > Messages
In this example "Search1" where {0} in the message text refers to the user variable we will replace in widget's code in the next step.
Clone the “Typeahead Search” widget and modify the following code at line 52:
options.placeholder = options.placeholder ? gs.getMessage(options.placeholder) : gs.getMessage('Search1', gs.getUser().getFirstName());
Code from the original unedited widget below as a reference:
Then replace the search widget on your portal with your cloned widget.
- 21 Views
