How does the most recently added item appear in the search list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 05:04 AM
I have gone through the documentation mentioned here: https://community.servicenow.com/docs/DOC-2259?q=How%20does%20the%20most%20recently%20added%20item%2... and also read the recent documentation published on "ServiceNow Basics - User Guide"(Attached). Both the documents share the same information about "Using the Dynamic Operator". Could someone here kindly explain the actual algorithm and how it works?
I am interested to learn how the most recently added item appears in the search list. Is it because of the most recent entry is with the most recent memory address where it is being stored. Please explain.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2017 06:27 AM
Hi Nandan,
Have you read this:
http://wiki.servicenow.com/index.php?title=Using_Filters_and_Breadcrumbs#Dynamic_Filter_Options
and http://wiki.servicenow.com/index.php?title=Using_Filters_and_Breadcrumbs#Scripted_Filters ?
"Dynamic filter options enhance filters by allowing users to run a set query against a reference field without having to enter JavaScript code in the condition builder. All dynamic filter options use the is (dynamic) operator and call a particular scripted filter."
A scripted filter is essentially a Script Include.
"The condition builder alone cannot create some filters, such as displaying a record set that is dependent on an unrelated table. Administrators with a knowledge of JavaScript can create JavaScript functions for use in advanced filters.
To use a scripted filter:
- Create a new script include.
- In the script include Script field, create a JavaScript function that returns an array of sys_ids.
- Ensure that the function uses the same name as the script include.
- Ensure that the script include is Active and Client callable.
- Call the JavaScript function from the condition builder."
"To create a dynamic filter option:
- Create a scripted filter as a client-callable script include or business rule.
- Navigate to System Definition > Dynamic Filter Options.
- Click New.
- Enter the Dynamic Filter Option form fields (see table).
- Click Submit."
So to find how your "most recently added item" works (if it is a dynamic filter), go to System Definition > Dynamic Filter Options and open that filter, to see how it was made. You might have to look for the script include too, if there is one specified.
BR
/Miriam