2 Replies Latest reply: Jun 17, 2013 6:06 AM by Justin Morley RSS

    Getting selections from a data island into an Extension

    Justin Morley


      I'm trying to pass a selection from a data island into an extension object, and having little success. I need to do this because the data island contains information about how I want to further process my main data selection.

      Here is what I've discovered so far:


      • If I set my dimensions up to just include columns in my main data source, the rows of data appear absolutely fine
      • Adding a column from my data island stops any rows appearing in my extension  (the javascript: alert(this.Data.Rows.length); reports 0 rows regardless of how many rows are actually selected/filtered)
      • A straight table in QlikView configured to have exactly the same dimensions and expressions display the data expected. More than a single row selected in my data island produces a cartesian join, which is a pain, but I guess this is expected behaviour.
      • What would be more useful would be a mechanism of getting to the data in the data island within the extension which does not rely on the dimensions and expressions passed in. Is there such a mechanism? The documentation I've seen is unclear, and I've only seen this.Data.Rows being used as a source of data within the extension.



      Thanks in advance,



        • Re: Getting selections from a data island into an Extension
          Justin Morley

          Well, I've answered half of my question now myself with some more investigation.

          Unlike the straight table, the extension object demands both expressions and dimensions to be populated for both the main data and the data island. I did this by adding an extra, fake, column to my data island and passing this in as an unaggregated expression.


          This gives me the same set of data in my extension as I see in my straight table, and is subject to the same problem: the main data makes a cartesian join with the data island!


          One approach to this would be to just look at the first value in the data island and ignore the rest.


          I'd still like to know if there is an option to not use expressions and dimensions at all to interrogate my data island?

          Do I have access to anything other than these within my extension?


            • Re: Getting selections from a data island into an Extension
              Justin Morley

              An with a bit more time and investigation I've managed to bypass the cartesian join problem too! I've now passed all the information from my data islands in as a calculated, concatenated expression using the following in my Definition.xml:


              <Measurement Label="Measure 1" Initial="DoseColumnID"/>

              <Initiate Name="Chart.Expression.0.0.Definition" Value="'{' & Concat(DoseColumnID,',') & '},{' & Concat(TimeColumn,',') & '},{' & Concat(TimeUnit,',') & '}'" />


              I can then parse this field and work out the contents of my 3 separate data islands from here, without the danger of a cartesian join causing 1000s of rows of data to appear in my extension object. Marvellous. Sorry to bother everyone with this thread, and then working an answer out for myself!