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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

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

psaxena
1-Visitor

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.

ACCEPTED SOLUTION

Accepted Solutions
ibanham
12-Amethyst
(To:psaxena)

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.

ibanham
12-Amethyst
(To:psaxena)

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.

psaxena
1-Visitor
(To:ibanham)

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.

ibanham
12-Amethyst
(To:psaxena)

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".

psaxena
1-Visitor
(To:ibanham)

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

ibanham
12-Amethyst
(To:psaxena)

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

psaxena
1-Visitor
(To:ibanham)

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

ibanham
12-Amethyst
(To:psaxena)

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.

psaxena
1-Visitor
(To:ibanham)

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

ibanham
12-Amethyst
(To:psaxena)

Use QueryStreamEntries with data rather than Get....

psaxena
1-Visitor
(To:ibanham)

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

Announcements


Top Tags