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.

how can i hide or show formatter field in a table

mishra007
Tera Contributor

there is a requirement where i want to hide or show formatter field in a form, without document.getElementById or jquery because as per the client it is not the best preactice, is there any glideform method or anything apart from this i can use, also document.getELementById and jquery is causing healthscan finding issue.

1 REPLY 1

Community Alums
Not applicable

Hi @mishra007 ,

Unfortunately that's not a correct statement coming from your client, please advise your client below:

UI formatter in not a field so setVisible or setDisplay method will not work.

You will have to try out DOM level manipulation.

You can use the $ selector to element ID and hide it using DOM methods when particular condition is met.

Hence, your initial recommendation is in the right direction.