Show UI Action only on tables with a Script type field

Mark Roethof
Tera Patron
Tera Patron

Hi all,

 

For one of my Instance Scan use cases, I am thinking of creating a UI Action which should only be visible for tables which contain at least one script type field. Ideally ofcourse using the condition field within the UI Action for this. 

 

Ofcourse I could create a UI Action specifically for every single table with a script type field, though then I would need to create hundreds of UI Actions, and what if new tables are added... Instead wanting to run this against sys_metadata, which works fine for my use case. Though now the question, also limiting this to only the tables with an actual script field. 

 

Any ideas?

I haven't done much brainstorming myself yet, though thought let's post on the community, perhaps someone already has did some serious thinking on this 😅

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

1 ACCEPTED SOLUTION

Ah yeah, I solved it by using g_scratchpad. A business rule populating the value, and just using it in the UI Action. It was just for brainstorming / playing around, so not actual production work. For example haven't looked into if this would hurt performance.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

10 REPLIES 10

That could be a way for some requirements.

 

My requirement was really to check the type of the field, since not all script fields are called script, or not all fields called script are script, and there are multiple types of script fields.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn