Clear the recent selections of Catalog item Variable on the form

Lucky1
Tera Guru

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

4 REPLIES 4

jcmings
Mega Sage

Is this in ServiceNow or is it in your browser?

stacey45mar
Kilo Contributor

@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.

Hello Stacey,

 

Can you tell me what type client script I need to create and how to clear the recent selections?

 

 

Regards,

Lucky

SamrudhiK
Tera Contributor

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.