cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove the duplicate entries (alternate entries) from a grid which displays an infotable.

psaxena
1-Newbie

How to remove the duplicate entries (alternate entries) from a grid which displays an infotable.

in the alert history table each alert is displayed twice as an alternate entry.

1 ACCEPTED SOLUTION

Accepted Solutions

Use QueryStreamEntries with data rather than Get....

View solution in original post

11 REPLIES 11

That's strange, did you tried to query for Alerts directly with Test button on the composer to see if maybe you have the Data doubled and it's not a Grid bug.

The Alert History table is basically a Stream that records Alerts and what happened to them. It's normal to have multiple entries for a single alert.

You get an entry when the Alert is triggered, and another when it is reset. You will also get an entry when the Alert is acknowledged.

I am displaying the alert history table in a grid in a mashup, so can I eliminate dulicate entries in a grid? Because the difference is in the decimal value of seconds in the timestamp.

Look at the Alert History screen under the Monitoring menu - the eventName column should give you something to filter by.

A new alert has an event name of "Alert", when the alert re-sets the event name is "AlertReset".

now how to display this table in the grid with only Alerts entry and not the AlertReset

Add a query/filter to your service that retrieves the Alert information

I am using the service GetStreamEntriesWithData of the thing AlertHistoryStream. Now where to apply a query or filter in this service

You can hard code a query in the mashup, click on the query section in the service properties (bottom right hand side of screen) and set up your query.

Better practice is to write your own service that calls GetStreamEntriesWithData and then applies a filter to it. There are snippets available that will do most of the coding for you.

Hi

I cannot find the queries section in the service properties where I have to write the query to filter.As far as writing my own service is concerned there is no snippet for calling getStreamEntriesWithData

snippet for queryerror.png

Use QueryStreamEntries with data rather than Get....

Yes now it works. Thank you so much for the help Ian.

Announcements