Service Now Catalog variables visibility only in task not on form

aagnihotri
Tera Contributor

How to make sure that the service catalog variables are visible only on the task but not on the form while a user is requesting a request ?  For eg I don't want the department part to come up while filling my form , but when I create my request task in that I can populate the department variable ?

6 REPLIES 6

Ravi Chandra_K
Kilo Patron
Kilo Patron

Hi @aagnihotri 

This can be achieved with UI Policy or Client script.

You have to hide variable and select apply on catalog item view 'checkbox'

refer below article which discusses the similar requiremen:

https://www.servicenow.com/community/developer-articles/new-quot-hide-quot-variable-field-onload/ta-...!

 

please mark the answer as helpful and correct if helped.

Kind Regards,

Ravi Chandra.

Maddysunil
Kilo Sage

@aagnihotri 

You can hide that variable using hidden checkbox and you can create a ui policy to show only on catalog task.

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

 

aagnihotri
Tera Contributor

hi how can i show on ui policy as its asks to give a condition ?

 

shyamkumar VK
Kilo Patron

@aagnihotri , If you Want to show Certain Variables on Cat Task , then Create Seperate UI policy And under Applies to Select only on Item level and leave other two options empty

 

PS : Why I’m Suggesting separate UI policy because you might have different ui policy actions in the same UI policy which you want to show them on Item level so not to make conflict have asked to create Seperate UI policy

 

Also Ensure you give proper Condition on UI policy !!

 

Let me know if you need any Further Information!!

 

Regards,

Shyamkumar

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar