Clear the recent selections of Catalog item Variable on the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 10:15 PM
Hello all,
I have created a catalog item and in that there is a field of type "email".
It is showing up recent selections and when selected from the recent selections, then the form is behaving weird.
Sometimes hanging up.
So, I understood sys_ui_recent_selections table will hold the recent selections in service-now but I am trying to find out for catalog item variables.
My task, is to remove the showing up of recent selections when we click on the email ID variable.
Can someone tell me how to do this?
Regards.
Lucky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 12:25 PM
Is this in ServiceNow or is it in your browser?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2024 10:22 PM
@Lucky1 wrote:Hello all,
I have created a catalog item and in that there is a field of type "email".
It is showing up recent selections and when selected from the recent selections, then the form is behaving weird.
Sometimes hanging up.
So, I understood sys_ui_recent_selections table will hold the recent selections in service-now but I am trying to find out for catalog item variables.
My task, is to remove the showing up of recent selections when we click on the email ID variable.
Can someone tell me how to do this?
Regards.
Lucky
To remove recent selections from an email field in a ServiceNow catalog item, create a client script that clears the field's value when it's clicked. Set the client script properties to trigger on the specific email field. This will prevent the display of recent selections and improve the user experience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2024 09:28 PM
Hello Stacey,
Can you tell me what type client script I need to create and how to clear the recent selections?
Regards,
Lucky
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 05:52 AM
Try this onLoad client script -
function onLoad() {
// Get the email field element
var emailField = g_form.getControl('your_variable_name');
if (emailField) {
emailField.setAttribute('autocomplete', 'off');
}
}
//Replace your_variable_name with the name of your variable.