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

SivaprasadV
Tera Expert

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..?

1 ACCEPTED SOLUTION

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! 🙏

View solution in original post

4 REPLIES 4

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! 🙏

Hi @Ankur Bawiskar ,

 

Thanks for the solution I've implemented initially the second option which you suggested. But thanks for the solution.

AndersBGS
Tera Patron

Hi @SivaprasadV ,

 

Just put a condition on the UI action based on the record state.