Searching for a value in a workflow's run script or if script activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 02:18 AM
Hi experts,
I'm trying to find a way to search for a string inside the workflow activities that have a provision to enter scripts (such as run script or if script). The closest I got to was this thread -> https://community.servicenow.com/community?id=community_question&sys_id=4cd0d3a9dbdcdbc01dcaf3231f96...
However, whenever I try to open sys_variable_value
table, it times out (probably due to huge volume of data). I also tried sys_variable_value.FILTER
and then adding a "Created on Last Minute" filter and still it was timing out.
Thus was wondering if there was a way around this or perhaps an alternate way to searching?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 04:14 AM
FetchCode will find values inside of workflow scripts (and almost everywhere else).
It's free, on the Share site, and easy to download and install (import an update set).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2022 04:29 AM
Thanks. That looks dope.
However, if I check the code, it's basically gliding the sys_variable_value
table for activity definitions - something that I too was attempting to do and faced timeouts. How would this ensure that while searching it doesn't get timed out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 03:45 AM
I don't know if the installation changes any of the timeout durations, but it's likely bypassing it. When working with a long-running script I recall seeing something about a way to run a script that doesn't use the system duration, so it's like it's trusted, or runs in the background or something so that it can run longer without impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-16-2025 03:54 AM
Hi folks,
Apart from Brad's suggestion, is there any other way to achieve it?