Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi,
i didn't work a lot on mashups but i was thinking of something, lets say i have energy meter that sends me readings that i use to calculate the hourly consumption and then i log it, then i put it in an infotable that has 24 rows representing the past 24 hours, and when i add new reading i delete the oldest one in the infotable so that the table will always be 24 row, then this infotable should be connected to some line chart or bar chart in a mashup to show the 24 values, all of this is fine, if i created a previous and next buttons on the chart so that the user can see the 24 values before the current 24 values, i was thinking maybe create another infotable when the user click the previous data button a query to be run to get the data from the database and put it in this new infotable and then the chart will switch to read from this new infotable, the reason for another infotable is that if i used the same infotable and the user requested the previous data while there is a new reading is being put in the info table then the chart will show the newest reading with the previous 24 hours not the current 24 hours. or anyone has another idea ?
sorry for the long explanation, and why i am using infotable is to make the charts load faster for multiple users
thanks,
This was very hard to read. Kind suggestion to end sentences with a period once in a while.
The standard way of doing this would be to have the hourly consumption be a logged property, i.e. using a value stream.
Then you use QueryPropertyHistory (or similar) to query for the date range you want to display. This will give you an infotable with all the entries of day X.
When you also use the startdate and enddate parameters of the service, this will use the index on the db table and be a very fast call.
No need to add in the complexity of handling multiple infotables in your mashup.
Instead of your back and forth button you can use the pagination widget. https://support.ptc.com/help/thingworx/platform/r9.6/en/#page/ThingWorx/Help/Mashup_Builder/Widgets/PaginationWidgetThemable.html#