Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

sys_template

Tanu Rani
Tera Contributor

Is this possible to hide some options in template while creating template? For example if I wish to hide option 'Class'.

TanuRani_0-1764602498236.png

 

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Tanu Rani 

not possible as per my understanding.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Tanu Rani The fields in this dropdown are coming from the table you added above, so it will display all fields from that table. You cannot hide them, but you can add validation. Have a look at the standard Change properties for the same.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

GlideFather
Tera Patron

Hi @Tanu Rani,

 

I guess it could be done by removeOption() or addOption() with onLoad client script.

 

Not guaranteed, but you can try yourself... get inspiration from this post (they refer to onChange, but your will be onLoad):

https://www.servicenow.com/community/itsm-forum/add-option-remove-option-in-onchange-client-script/m... 

_____
This reply is 100 % GlideFather and 0 % AI

OlaN
Tera Sage
Tera Sage

Hi,

I wonder why you would need to hide some fields. What's the use case?

If you want to restrict fields from the template, then they should not be writeable (write ACL).

If a user has access to write to the field, then it will also appear as a valid field in the template.