In an IoT Application you may want to keep the histories of thing(s) Properties. E.g. keeping history of the GPS location of a truck.


Logging Property History:

1. From ThingWorx composer under Data Storage create a Value Stream say "TestValueStream".

2. Create a Thing say "TestThing" with "Generic Template",  or select the template you want to use. In the Value Stream field of the thing use "TestValueStream".

3. In Property section add two properties:

  • String Property called "MyStringProperty"
  • Number Property called "MyNumberProperty"
  • Make both of them Logged.

4. Now update these property multiple times.


Viewing Property history:

1. Go to Services Section and expand generic thing -services.

2. Run the following Services:

Service NameDescriptionParameter
QueryPropertyHistoryShows Changes In Property of all the logged thingsNone
QueryNumberPropertyHistoryDisplay Changes in the Number PropertyMyNumberProperty (your property name)
QueryStringPropertyHistoryDisplay Changes in String PropertyMyStringProperty (your property name)

Note: Use the Other Property Query services for the data type you like (e.g. QueryInfoTablePropertyHistory.