2 Replies Latest reply on Jul 22, 2011 12:58 AM by Henryk Schneider

    Set Trend Time Range based on Time Series selection +/-12h

    Henryk Schneider

      Been trying for a while and not getting anywhere with this.


      What I would like to do is when the user selects/clicks a record in the TimeSeries web part, the Trend WebPart below displays data for the same point with a time range of selected value's time +/- 12 hours.   So if I selected an row with time of 2011-Jun-20 06:00:00, the trend should display data for that point from 2011-Jun-19 18:00:00 to 2011-Jun-20 18:00:00.


      I've got as far as the trend displaying for the selected time, but can't find a way to set the relative range from that.  I get either 0 time range or from selected time to *.


      Not sure if this is possible with just using the WebParts (currently using 2010 R2), but thought I'd ask before going a slightly different path and trying to use Query String Parameters for the defaults.  Which I assume will mean writing a separate page/form to calculate the required time range and then to call the trend page & wp with those parameters.



        • Re: Set Trend Time Range based on Time Series selection +/-12h

          Mmh - you can do it, at least I have a workaround for you. Here is what I did to manage a time calculation for a PI Trend:


          1. I created an OLEDB data set in the PI data services admin:

          SELECT ? + ' - 1h' StartTime, ? + ' + 1h' EndTime



          As you can imagine, the two placeholders are Text.


          2. I added a PI Table web part and connected the time series web part to this one, passing the timestamp to the two place holders


          3. I connected the two columns from the table web part to the trend to pass the start and end times.