Searching the script field(s) of workflow activities

Michael Domke
Tera Guru

Is there a way to search the various script fields in workflow activities? I need to verify the use of certain table/field uses in workflow activity scripts.

For example, search all workflow activity scripts to see which ones contain "u_software" somewhere in the script. To do this manually will be very time consuming as well as the potential for blurry eyed oversight mistakes.

Thanks,
Michael

1 ACCEPTED SOLUTION

Michael Domke
Tera Guru

To benefit others:

Yes, you can do this search.
1) In the Navigator filter box, type sys_variable_value.list <-- This takes you to the table to search
2) Click on the Filter wizard icon to create a custom filter
--- Table (document) is wf_activity AND
--- Variable.Column Name contains script' OR
------ Variable.Type.Name contains 'script' AND
--- Value contains [whatever you are searching for]

Although, I could not find Variable.Type.Name in the filter wizard. Variable.Type didn't show to have any related fields.


View solution in original post

23 REPLIES 23

Awesome script!  I added to the query within wf_activity to get just the published records:

var keyword = 'PROVIDE_YOUR_KEYWORD';
var query = 'valueLIKE'+keyword;
var arr = [];
var tbl = new GlideRecord('sys_variable_value');
tbl.addEncodedQuery(query);
tbl.query();
while(tbl.next()){
var wftbl = new GlideRecord('wf_activity');
wftbl.addQuery('sys_id', tbl.document_key);
wftbl.addQuery('workflow_version.published','true');
wftbl.query();
if(wftbl.next()){
arr.push(wftbl.workflow_version.name+' Activity: ' + tbl.document_key.name);
}
}
arr.sort();
for(i=0; i< arr.length; i++){
gs.print(arr[i]);
}

 

pankajdesh
Tera Contributor

I am looking for a solution to replace Twillio and use some free application to send sms on mobile phones. Please suggest me of you know any.

Companies can purchase SMS subscriptions from Mobile Network providers. They expose REST API's using which you can send SMS. Free application won't be a good idea as you need to use employee's contact numbers as well message will contain some organization data.

This question is no consistent with this thread. I would suggest posting this question outside this thread. You may get more exposure to your question.