Catalog Item variable hidden on the request but visible on the RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 01:44 AM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 02:50 AM
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:
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.
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.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2024 03:13 AM
Hi @dev_K ,
You can create onload catalog client script applies on catalog item to hide variable on catalog form and show in ritm .
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand