Alarm status table in ignition perspective

Hi, I have a doubt in alarm status table. I want to filter the top 5 alarms from alarm status table and display in the table component . If the new alarm comes the last one should go and new one should add. Based on timestamp the alarm should take the recent 5 alarms.


image

Inside the properties of the Alarm status table in the options section, in initial option we set 5 so that only 5 alarms are shown. To filter by time, we go to columns/active and select active time in sort: descending and order with number 0. Finally, in pager, I set it to hide so that the option would not be displayed below the table, and this is the final result:

1 Like

This is how it looks inside the browser:

You can modify the properties of the table to customize it to your liking!

Thank you. I don't want to adjust
in status table, I just want to filter and visible in pop up view.

This function return list of alarm events and then you can display top 5 alarms.

1 Like

Can u Please help me. I want to filter the top 5 alarms from alarm status table and view in the table component. In my alarm status table have all active alarms. But in my table component only the ActiveUnacked alarms should have.

Paste this binding to the props.data property of your Table component
While it might not be the complete code, it serves as a guide to steer you in the right direction.

Binding
{
  "type": "expr",
  "config": {
    "expression": "now(60000)"
  },
  "transforms": [
    {
      "code": "\tstate \u003d [\"ActiveUnacked\"]\n\talarms \u003d system.alarm.queryStatus(state \u003d state)\n\talarm_pyDS \u003d system.dataset.toPyDataSet(alarms.getDataset())\n\treturn alarm_pyDS[:5]",
      "type": "script"
    }
  ]
}