Catalog Item variable hidden on the request but visible on the RITM

dev_K
Tera Contributor

Hi all,

 

I have a catalog item that needs to contain one variable that will be hidden for user who submits a request but it will be visible on the created RITM's variables list.

 

 

I tried to set is as global=true, and hidden, but then it is hidden on both in the request form and in the RITM variables.

 

 

How this can be achieved?

 

thanks!

2 REPLIES 2

Adarsh3003
Giga Guru

Hi @dev_K ,

 

You can apply below points. May be it will working for your scenario 

To achieve the desired behavior in ServiceNow, follow these steps:

  1. Variable Configuration:

    • Create the variable you want to hide from end users.
    • Set the “Hidden” checkbox to true. This will hide the variable on the request form.
  2. Reference Qualifier for RITM Variables:

    • In the RITM (Requested Item) form, the variable will be visible by default.
    • To hide it from the RITM variables list, you can use a reference qualifier.
    • Edit the “RITM Variables” related list on the RITM form.
    • Set the reference qualifier to exclude the specific variable you want to hide. For example:
      JavaScript
       
      // Assuming 'u_my_variable' is the variable you want to hide
      'u_variable_name!=u_my_variable';
      AI-generated code. Review and use carefully. More info on FAQ.
      This script ensures that the specified variable is not displayed in the RITM variables list.
  3. Testing:

    • Test the behavior by submitting a request and checking the RITM variables list.

Remember to adjust the field names and table names according to your specific ServiceNow instance

 

If this is helpful for you, Please mark Helpful and Correct solution


Thanks & Regards
Adarsh Verma

Anand Kumar P
Giga Patron
Giga Patron

Hi @dev_K ,

You can create onload catalog client script applies on catalog item to hide variable on catalog form and show in ritm .

AnandKumarP_0-1718187139922.png

 

AnandKumarP_1-1718187176391.png


Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand