Reporting Filter on Priority

I see no way in new system to bind to min and max priority levels so they can be dynamically filtered on when using Alarm Journal Query. Am i missing something?

You’re right, the Alarm Journal Query doesn’t have dynamic priority selectors, they’re static. We could add this, but in the meantime you could do this with a Script data source as follows.

Imagine you had two report parameters for “MinPriority” and “MaxPriority” which were numbers 0 (diag) - 4 (critical).

you could query the journal and inject the results into the report data map like so:

[code]min = data[“MinPriority”]
max = data[“MaxPriority”]
prioRange = range(min, max+1)
start = data[“StartDate”]
end = data[“EndDate”]
journalResults = system.alarm.queryJournal(startDate = start, endDate = end, priority = prioRange, journalName = “MyJournal”)

data[“AlarmJournal”] = journalResults.getDataset()[/code]

Thanks Carl
But i was looking for way to use all the other data returned in the Alarm Query Dataset like duration and others.
As you know this only returns the base columns of the alarm table and linked data if so configured.
I will stick with our query that does this and if you decide make the priorities dynamic then ill look at this again.

Also i couldn’t get the above code to run. The priority = is looking for strings separated by commas i.e. [“1”,“2”,“3”]
and the range function is returning 1,2,3

Thanks
Again