We had a request from a customer who wanted to display weather information from Wunderground.  It provides weather information in the form of XML. That is not a problem for DataPoint but he wanted to display information of the observation table and that table has an undefined number of data rows. With an interval of minutes a new observation is added to the table. He wanted to display information of the last observation.

xml wunderground weather information unsorted

Now with DataPoint the user can easily link a text box to the data row and display the information. But here he did not wanted to display the first data row, or walk thru the data with DataPoint’s data scrolling. He just wanted to display the last observation row.

In terms of databases, this is very easy.  The observation table contains all data and the user needs a query on top of that data table which would reverse the logging sequence so that the last observation row would be at the top so that the user could link row number 1 on the slide. But this does not work with XML connections. An XML data file is retrieved over the internet and the user cannot define a query on top of it like the user would be able in a database system like a Microsoft Access database.

So we had to come up with a solution.  Now DataPoint can sort data locally after getting the information from the remote location. Set up a new connection to the xml data provider as usual and select to use the current_observation table.

Now click the Advanced button.

local data sort options, column names and sequence to sort

Check the option to Sort data locally.  Now the user can have up to 3 columns that can use to sort the data.  Here in this screenshot, we selected the column named observation_time_rfc822 and choose to sort in the descending way.  With this option the last observation data will always be at row number one in our list.  Now click OK to close.

all data is sorted locally based on selection

Voila and done! We now have the last observation information on top and use text boxes to link the information of row number 1.

This local sort option is now available in all DataPoint editions and for all types of connections, including databases, RSS feeds, Excel files, text files and twitter information.

Sort your data in PowerPoint

Pin It on Pinterest

Share This