AI Search Assist showing up in variable editor

Michael Culhan1
Mega Sage

I added AI Search Assist to a record producer.  It automatically adds the AI Search Assist variable.  When the user submits and is taken to the ticket page, the AI Search Assist variable appears on the Variable Editor (read only).  How do I hide it?  Catalog UI Policy doesn't work.

 

Note that I have to use a Variable Editor (read-only) on the ticket page because Variable Summarizer doesn't display html and my description field is html (so that users can paste screenshots)

 

 

MichaelCulhan1_1-1779812383143.png

 

1 ACCEPTED SOLUTION

This was close but missing some key information.  Here's the working catalog client script

MichaelCulhan1_0-1779827211673.png

 

View solution in original post

3 REPLIES 3

Tanushree Maiti
Tera Patron

Hi @Michael Culhan1 

 

  1. Open your record producer
    • Navigate to Service Catalog > Catalog Policy > Catalog Client Scripts.
    • Click New.
    • Name: Hide AI Search on Ticket Form
    • Table: Select your Record Producer table.
    • Type: onLoad
    • UI Type: All

function onLoad() {

        g_form.setDisplay('variables.u_ai_search_assist', false); // Replace 'u_ai_search_assist' with the actual variable name

}

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

This was close but missing some key information.  Here's the working catalog client script

MichaelCulhan1_0-1779827211673.png

 

Abhishek Pal
Tera Contributor

Catalog UI Policy will not work here because the Variable Editor on the generated ticket reads the submitted variables from the backend.

The simplest approach is to remove the AI Search Assist variable answer after submission. Create an After Insert Business Rule on the target ticket table and delete the matching record from the question_answer table where table_sys_id is the generated ticket sys_id and question.name is the AI Search Assist variable name.

This will prevent that variable from appearing in the read-only Variable Editor.