6 Replies Latest reply on Apr 21, 2009 1:21 PM by Asle Frantzen

    Providing parameters / filter data from an RtTable to an RtValues table?

    Asle Frantzen

      Hi guys

       

      I have a database query (pi oledb) where I get data in this format into an RtTable:

       

      timestamp    tag1tag2tag3tag4
      time1 tag1_1.value     tag2_1.value     tag3_1.value     tag4_1.value
      time2 tag1_2.value tag2_2.value tag3_2.value tag4_2.value
      time3 tag1_3.value tag2_3.value tag3_3.value tag4_3.value
      time4 tag1_4.value tag2_4.value tag3_4.value tag4_4.value

       

      I have set up a behaviour for this dataset, where I've made the timestamp column into a hyperlink.

       

      The background for my setup is a report where users want to see a set of control measurements registered once per hour, and they always want to see the four latest registrations in the list above. In addition to the four tags shown, there will be 6 more tags registered at the same timestamp. These 6 tags will be configured to be shown in an RtValues table. I want to show the values for those 6 tags - at the time of the selected timestamp from the RtTable!

       

      So basically: User clicks on time1 in RtTable, and the 6 tags in the RtValues table will display the values registered in PI at that exact time (time1).

       

       

       

      The RtValues webpart is set up to show Time, Tag and Value. I've also set up the Filter Value to be Time. The next thing I want to do, is select "Send filter data to" from the Connections menu for the RtTable, and select RtValues. In my perfect world, the timestamp sent by RtTable and received in RtValues would then filter the timestamps for the 6 tags in the RtValues table - thus making my day :)

       

      But I end up with the dialog in the image below. It seems like the RtValues webpart doesn't support receiving filter data. Is there any other way I can solve this?

       

       (I even tried providing parameter data from the RtTable to the RtValues webpart, but that just makes the RtValues treat the received data as a tagname).

       

       

       

      problem_5F00_connection.jpg

       

      I'm using RtWebParts 2.2.0.0 with Sharepoint Services 3.0 (not MOSS) btw!

        • Re: Providing parameters / filter data from an RtTable to an RtValues table?
          andreas

          Hi Asle,

           

          not sure if I got you right (or you are thinking to complicate ).

           

          I created a query to show four tags. afterward I created a webpart page and put the RtTable webpart with this query on it. If i add another RtValues and simply connect the two webparts together (no filter setting, simply provide parameters) and later on select that the RtTable time column populates the Endtime of the value object and this seems to do the job (clicking on the timestamp in the RtTable adjusts the timestamp in the RtValues).

           

          Regards,

            • Re: Providing parameters / filter data from an RtTable to an RtValues table?
              Asle Frantzen

              Hi Andreas

              1. I add the RtTable
              2. I set it up to use my dataset
              3. I create a behaviour for the dataset, making the Time column into a hyperlink, and apply the behaviour to the RtTable
              4. I add the RtValues
              5. I connect the RtTable to RtValues using "Provide parameters to..."
              6. At this point the RtValues does not have any tags, datasets or connections, under Selected Data. Clicking the timestamp-link in RtTable will now result in an error message:

              [21.04.2009 10:02:05] \\hau-s010\07.04.2009 16:56:00: PIPoint not found. \\hau-s010\07.04.2009 16:56:00

               

              Here my pi server is 'hau-s010' and as you can see, the timestamp '07.04.2009 16:56:00' is treated as a tag.

               

               

               

              What is the next step - do I need to create a dataset, and connect the time-column from RtTable to a placeholder in the relational query for RtValues? (Where I set up the placeholder as a 'date' with 'endtime'?

                • Re: Providing parameters / filter data from an RtTable to an RtValues table?
                  andreas

                  Hi Asle,

                   

                  3 - I did not create a behavior - what did you set up as behavior for the time column?

                   

                  4 - I had tags already in the RtValues. But i just checked and that is not the problem.

                   

                  Regards,

                    • Re: Providing parameters / filter data from an RtTable to an RtValues table?
                      Asle Frantzen

                      I set the behaviour up with the time column as a hypelink, and selected the "provide row data" (last choice) as link.

                       

                       

                       

                      But just to follow your example, I removed the behaviour. I also put 2 tags in the RtValues table (sinusoid and sinusoidu), and made sure that the time column is filtered by. (I have selected time, tagname and value to be shown).

                       

                       

                       

                      Now I should have a setup equal to your setup. But there's no reaction in the RtValues table, when clicking in the RtTable. RtValues just shows snapshot-values - the time doesn't change at all.

                      • Re: Providing parameters / filter data from an RtTable to an RtValues table?
                        andreas

                         

                         

                        Hi Asle,

                         

                        just tried it with RtWebparts 2.2 and it works fine - have you set the connection to the EndTime in the RtValues webpart as shown below?

                         

                        090421_5F00_01.jpg

                         

                        regards,

                         

                         

                          • Re: Providing parameters / filter data from an RtTable to an RtValues table?
                            Asle Frantzen

                            Thanks Andreas, I just got it now. The connection icon wasn't green, so the EndTime wasn't set properly.

                             

                            Anyways - I did get the result I wanted yesterday, but with a slightly different approach. Instead of using an RtValues table as the secondary webpart, I used another RtTable. I set up a relational dataset with a ? placeholder for the time. After doing that, a connection group box appeared in the 'modify shared webpart' config for the RtTable 2 - where I could connect the time column from RtTable1 - which I turned into a hyperlink with a behaviour - to the placeholder in the sql query.

                             

                            But I wanted to see the solution to the RtTable-RtValues setup as well, so thank you for your help!

                             

                            It's great seeing and learning the possibilities we actually have with RtWebparts. We've kind of made our own webparts/solutions when we hit the wall previously, but it's a huge timesaver for both us and our customers when we can utilize all of the RtWebparts' built-in functionality.

                             

                            Thanks again!