Skip to main content
16-Pearl
October 3, 2019
Question

How to display time series data in a grid using individual property values with the same timestamp

  • October 3, 2019
  • 1 reply
  • 3884 views

I need to display historical data of individual property values in a grid as shown below.

Columns "RUN NO", "USER ROLE", "PREHEAT TIME", "START", "END" are all defined as individual properties.  When these properties are updated, they are updated together so they have the same timestamp, creating a record.  How can I display these records in a grid?

 

Grid with time series dataGrid with time series data

1 reply

5-Regular Member
October 3, 2019

Are you looking to display historical records of just one property on a Grid? How are these values stored in ThingWorx? Is it on a ValueStream? If so, you can call a service like QueryNamedPropertyHistory, and pass in your property name to get an Infotable with just that property's historical data (with timestamp). You can then bind this to the Grid Advanced widget in your Mashup (you would need to pass the property name, otherwise this will error out as it'll try to fetch a null property).

 

If you're looking to display all properties with the timestamp, you can use QueryPropertyHistory instead (assuming you have the same Value Stream setup) and bind that to the Grid Advanced widget.

Willie16-PearlAuthor
16-Pearl
October 3, 2019

I need to display historical records of multiple properties so each record would have multiple properties with the same timestamp.  These properties belong to a thing that has a valuestream set to it.

 

The reason I am not using an infotable is because the edge thing uses an Axeda Agent.  Axeda agents can only send string, boolean, and number properties to the server.


For example, there are 5 properties that I want to combine into 1 record.  Each property has some value.  These properties were all updated on the edge simultaneously; therefore, they have the same timestamp.  The grid would display multiple records of these properties as shown in the original post.  It would not be for only 1 timestamp.  It would display historical records in chronological order.

 

Properties of a Thing.PNG

Willie16-PearlAuthor
16-Pearl
October 8, 2019

An idea I have is to combined these property values into a record in an infotable based on the timestamp.  This would be done through subscription.  Is this possible?  Is there a better idea?