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.

Beginner Asked on October 10, 2019 in Saved Searches.
Add Comment
4 Answer(s)

Have you tried keeping the date field at summary maximum but then grouping all the other fields? This might show multiple rows per day if scripts run more than once daily, so in that case maybe change the date field to include time?

Beginner Answered on October 10, 2019.
Add Comment

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

Thank both. We’re using this on a dashboard view, so need it to display single lines immediately without external manipulation. We have a custom warehouse order fulfilment system, which prepares various stages of pick batches using a  number of scheduled scripts. The search on the user’s dashboard allows them to see when the process for each stage has completed. It’s pretty close to working – it’s just the fact that a failed script keeps displaying ‘Failed’ despite subsequent successful runs which is an annoyance at the moment.

Beginner Answered on October 11, 2019.
Add Comment

Have you tried using the Execution Log Fields  filter in the saved search Criteria/Results? It offers Date and Time fields

  • Reports > Saved Searches > All Saved Searches > New
  • Results (TAB) > Execution Log Fields…. > Date | Time
Beginner Answered on October 23, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor