RE: Saved Search Last Script Execution

I’m trying to get a saved search to display the date/time and status of the last execution of a few scripts to show on a dashboard search.

I’ve created a script instance search, with date (last 5 days) and deployment ID criteria.

On the results page, I’m displaying:

Script Deployment : Title    (Summary : Group)
Formula (Date/Time) nl_tz.convert({datecreated})     (Summary : Maximum)
Status    (Summary : Maximum)
Percent Complete     (Summary : Minimum)

This generally works, but if the script has failed at any time in the last 5 days, status shows as failed, even if subsequent executions have completed successfully.

Can anyone suggest a simple way to display JUST the last log entry. I presume there’s a simple way to use a summary criteria to achieve this, but haven’t quite grasped how this works as yet.

dominicb Beginner Asked on October 10, 2019 in Saved Searches.
Add Comment
4 Answers

I don’t think that you can do  exactly what you’re describing easily with summary functions.  When you do min/max on the Status field, it’s just going to return the min/max result alphabetically (i.e. Min will return Complete, Max will return Failed (assuming you have instances that are both Complete and Failed in the mix)).

What I suggest is:

Status (Summary : Group)

Percent Complete (Summary : Group)


Then do Sort By:

First – Script Deployment Title

Second – Date Created (Descending)


Now run and export that search.  Now use excel to do the Remove Duplicates function (by Deployment Title).  Since you’ve already ordered it by the most recently created it’ll always keep that one and remove any subsequent ones with a different status.



Intermediate Answered on October 10, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.