
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 10:07 PM
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
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2025 09:10 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2024 05:18 AM
Update: Implemented and tested - it works for me. I put a list of tables to enable for these UI Actions into a sys_property, and used them in the Condition field like this:
(gs.getProperty('<my_property>').includes(current.getTableName()))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2024 02:36 AM - edited 08-30-2024 02:36 AM
is the Value of the Property a String (comma List of Table names) or an array
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2025 07:58 AM
Hi @Mark Roethof , have you found any solution to this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2025 09:10 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Ohh, I have not used g_scratchpad for this. Just have a look at my solution:
(typeof current.script != 'undefined' && !gs.nil(current.script))
used this in the condition field.