Can I Filter alarms using system.alert.queryAlertStatus

Hi I am trying to use this script to filter the number of alarms depending on what the Client Tag name is.

runScript(“system.alert.queryAlertStatus(” +
“activeAndAcked=” + toInt({Root Container.Alarms.activeAndAcked}) + “,” +
“activeAndUnacked=” + toInt({Root Container.Alarms.activeAndUnacked}) + “,” +
“clearAndAcked=” + toInt({Root Container.Alarms.clearAndAcked}) + “,” +
“clearAndUnacked=” + toInt({Root Container.Alarms.clearAndUnacked}) + “,”+ “displayPath=” + toString({[Client]SITE_NAME}) +").rowCount", 1000)

I am getting this error

a java.lang.Exception: Error executing expression binding on
Navigation.Root Container.Alarms.alarms
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:82)
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.childInteractionUpdated(ExpressionPropertyAdapter.java:50)
at com.inductiveautomation.ignition.common.expressions.TagListener.tagChanged(TagListener.java:74)
at com.inductiveautomation.factorypmi.application.sqltags.project.ProjectTagManager.subscribe(ProjectTagManager.java:360)
at com.inductiveautomation.ignition.client.sqltags.impl.ClientTagManagerImpl.subscribe(ClientTagManagerImpl.java:341)
at com.inductiveautomation.ignition.common.expressions.TagListener.startup(TagListener.java:86)
at com.inductiveautomation.ignition.common.expressions.BoundTagExpression.startup(BoundTagExpression.java:91)
at com.inductiveautomation.ignition.common.expressions.AbstractExpression.startup(AbstractExpression.java:73)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.startup(FunctionExpression.java:64)
at com.inductiveautomation.ignition.common.expressions.AbstractExpression.startup(AbstractExpression.java:73)
at com.inductiveautomation.ignition.common.expressions.AbstractExpression.startup(AbstractExpression.java:73)
at com.inductiveautomation.ignition.common.expressions.AbstractExpression.startup(AbstractExpression.java:73)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.startup(FunctionExpression.java:64)
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.startup(ExpressionPropertyAdapter.java:101)
at com.inductiveautomation.factorypmi.application.binding.DefaultInteractionController.setPropertyAdapter(DefaultInteractionController.java:196)
at com.inductiveautomation.factorypmi.designer.property.configurators.ExpressionConfigurator.bind(ExpressionConfigurator.java:264)
at com.inductiveautomation.factorypmi.designer.property.configurators.ExpressionConfigurator.tryCommit(ExpressionConfigurator.java:212)
at com.inductiveautomation.factorypmi.designer.property.configurators.ConfiguratorMultiplexor$EditorParent.tryCommit(ConfiguratorMultiplexor.java:206)
at com.inductiveautomation.factorypmi.designer.property.configurators.ConfiguratorMultiplexor.tryCommit(ConfiguratorMultiplexor.java:331)
at com.inductiveautomation.factorypmi.designer.property.configurators.DynamicOptsDialog.doOK(DynamicOptsDialog.java:117)
at com.inductiveautomation.factorypmi.designer.property.configurators.DynamicOptsDialog.access$000(DynamicOptsDialog.java:43)
at com.inductiveautomation.factorypmi.designer.property.configurators.DynamicOptsDialog$1.actionPerformed(DynamicOptsDialog.java:83)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at com.inductiveautomation.factorypmi.designer.property.configurators.DynamicOptsDialog.showDialog(DynamicOptsDialog.java:185)
at com.inductiveautomation.factorypmi.designer.model.VisionDesignerImpl.openBindingDialog(VisionDesignerImpl.java:759)
at com.inductiveautomation.factorypmi.designer.property.editors.bb.DynamicOptionsButton.actionPerformed(DynamicOptionsButton.java:36)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at com.jidesoft.plaf.basic.BasicJideButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI$Handler.repostEvent(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI$Handler.mouseReleased(Unknown Source)
at com.jidesoft.swing.DelegateMouseInputListener.mouseReleased(Unknown Source)
at com.jidesoft.swing.DelegateMouseInputListener.mouseReleased(Unknown Source)
at com.jidesoft.grid.TreeTable$DelegateExpandMouseInputListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: com.inductiveautomation.ignition.common.expressions.ExpressionException: Error parsing script for runScript() expression: SyntaxError: (“mismatched input ‘WWTW’ expecting RPAREN”, (‘expression:runScript’, 1, 133, ‘__RESULT = system.alert.queryAlertStatus(activeAndAcked=1,activeAndUnacked=1,clearAndAcked=0,clearAndUnacked=1,displayPath=BELTURBET WWTW).rowCount\n’))

at com.inductiveautomation.ignition.common.expressions.functions.ScriptFunction.execute(ScriptFunction.java:44)
at com.inductiveautomation.ignition.common.expressions.FunctionExpression.execute(FunctionExpression.java:69)
at com.inductiveautomation.factorypmi.application.binding.ExpressionPropertyAdapter.runExpression(ExpressionPropertyAdapter.java:73)
... 117 more

Caused by: SyntaxError: (“mismatched input ‘WWTW’ expecting RPAREN”, (‘expression:runScript’, 1, 133, ‘__RESULT = system.alert.queryAlertStatus(activeAndAcked=1,activeAndUnacked=1,clearAndAcked=0,clearAndUnacked=1,displayPath=BELTURBET WWTW).rowCount\n’))

at org.python.core.PyException.fillInStackTrace(PyException.java:70)
at java.lang.Throwable.<init>(Throwable.java:181)
at java.lang.Exception.<init>(Unknown Source)
at java.lang.RuntimeException.<init>(Unknown Source)
at org.python.core.PyException.<init>(PyException.java:46)
at org.python.core.PyException.<init>(PyException.java:43)
at org.python.core.PyException.<init>(PyException.java:39)
at org.python.core.PySyntaxError.<init>(PySyntaxError.java:22)
at org.python.core.ParserFacade.fixParseError(ParserFacade.java:92)
at org.python.core.ParserFacade.parse(ParserFacade.java:199)
at org.python.core.Py.compile_flags(Py.java:1751)
at com.inductiveautomation.ignition.common.expressions.functions.ScriptFunction.execute(ScriptFunction.java:40)
... 119 more

Ignition v7.5.4 (b1206)
Java: Sun Microsystems Inc. 1.6.0_26

Try using single quotes around the displayPath:

runScript("system.alert.queryAlertStatus(" + "activeAndAcked=" + toInt({Root Container.Alarms.activeAndAcked}) + "," + "activeAndUnacked=" + toInt({Root Container.Alarms.activeAndUnacked}) + "," + "clearAndAcked=" + toInt({Root Container.Alarms.clearAndAcked}) + "," + "clearAndUnacked=" + toInt({Root Container.Alarms.clearAndUnacked}) + ","+ "displayPath='" + toString({[Client]SITE_NAME}) +"').rowCount", 1000)