Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to Hide UI action button on list view based on the State field

SivaprasadV
Tera Contributor

In servicenow I have created a table.  In the table I created a button which will display on list Banner. I want to show that if in the list view record are in draft state. if any record's state is other than draft, that I should Hide the button from the list is it feasible in Servicenow..?

2 REPLIES 2

Tanushree Maiti
Giga Sage

Hi @SivaprasadV 

 

Check this post, try it with your state value and requirement

 

https://www.servicenow.com/community/service-management-forum/show-hide-of-list-banner-buttons-based...

 

https://www.servicenow.com/community/developer-forum/how-to-show-and-hide-list-banner-button-on-part...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Ankur Bawiskar
Tera Patron

@SivaprasadV 

List Banner buttons work on list and you can add condition in that.

You can't hide the button from list

The below is OOTB behavior

Example: current.state == 3

Now if you select 10 records from list and out of those only 6 are having State=3 then the script within List Banner will run only for those 6 and not for remaining 4

💡 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  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader