5 Replies Latest reply: Feb 20, 2012 10:02 AM by Lewis Johnson RSS

    Possible to have Expression Panel in custom Properties.qvpp?

      Hi All,

       

      I'm trying to add multiple expressions to my properties.qvpp (as you can do in the default properties), however with little success.

       

      I was wondering if there is a way to add the default Expressions and Dimensions Panels, as you can add the other panels, for example for the Layout default:

       

       <tr class="ToolProperty-Header" avq="panel::Layout.qvpp"><td>Layout</td><th></th></tr>
                          <tr style="display: none"><td colspan="2"></td></tr>
      
      

       

       

      Does anyone know what the Dimensions or Expressions panel is called? Is there a list of all the qvpp files we can get access to?

       

      If this functionality doesn't exist, I want to be able to define a fixed number of expressions and I don't want it to simply be picking from the standard drop down, which is all I'm able to find example of:

       

      <select style="width: 60px" avq="edit:.Chart.Expression.0.0.SimpleFunc"></select>
      <select style="width: 130px" avq="edit:.Chart.Expression.0.0.SimpleField"></select>
      

       

      What I'd like to be able to do is use the Expression Builder, but when I have the standard button to show the Expression Builder using the following:

       

       <button class="ToolProperty-DialogButton" avq="dlg:.Chart:Expression.qvpp">
           <img alt="" icon="web:style" avq="img:.Chart.Expression.0.0.NumberFormat.FormatType" />
       </button>
      
      

       

      I get the Expression Builder, but it doesn't seem to save or use the expression I enter. Where should it be writing it to? How do I get my chart to use or even remember the expression I type in?!

       

      Qlikview made a big thing of extensions when they launched v10, but the documentation is sparse to say the least. None of the example extensions do anything complicated when it comes to hooking the javascript up to the Qlikview data, and there is nothing in the documentation that shows the relationship between what's in the dialog and how it affects your data. Also, very few of our expressions are ever as simple as AVG(FieldName) or COUNT(FieldName), so the basic examples stop woefully short.

       

      Without more detail on the properties.qvpp, we can't make user-configurable extensions, which makes them pretty useless. We certainly aren't going to design an extension per project, so they need to be generic.

       

      For anyone who's got this far, we've built a dynamic word cloud extension that works the same as Wordle, but in iClick. However, until we can build more powerful expressions, it's a bit useless, but we'd be happy to share it once it's configurable via the properties file!

       

      Thanks in advance for your help!

       

      Josh

        • Possible to have Expression Panel in custom Properties.qvpp?
          Jérémy George

          AFAIK there is no qvpp file for expressions and dimensions (you can check that by looking requests sent to the qlikview server with the ajax client). You cannot reference it in your own qvpp file however removing the properties.qvpp from your extension results in the default qlikview properties dialog to be used.

           

          I also confirm that the lack of documentation on extensions is very frustrating.

          • Re: Possible to have Expression Panel in custom Properties.qvpp?

            Major fail to not have documentation on how to implement this feature. I did some backwards engineering on my own as I needed to support more complex expressions myself.  Here is what I found and it may help you.  I don't know if this is the "correct" way to do it but non the less it works...

             

            My definition file

             

            <ExtensionObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Definition.xsd" Label="Checkbox - ListBox" Description="List box with checkboxes and sort-headers for selecting">

              <Dimension PageSize="200" DropTarget="1st Dimension" Initial=""/>

              <Dimension PageSize="200" DropTarget="2nd Dimension" Initial=""/>

              <Measurement DropTarget="Measure" Initial=""/>

              <Initiate Name="Chart.Title" value="Checkbox - ListBox"/>

              <Initiate Name="Chart.Expression.0.0.Definition" value="Sum([Paid])"/>

            </ExtensionObject>

             

            Property file:

             

            <div class="ToolWindow-MainBody">

                <table width="360px">

                    <tr class="ToolProperty-Header" >

                        <td onclick="Qva.SelectToolPane(this, false)">

                            Dimensions &amp; Expressions

                        </td>

                        <th onclick="Qva.SelectToolPane(this, true)">

                            <img alt="" src="unpinned.png" icon="web:unpinned" avq="img:.Chart.Title"/>

                        </th>

                    </tr>

                    <tr>

                        <td colspan="2">

                          <table width="100%">

                            <colgroup>

                              <col width="70px" />

                              <col width="30px" align="center" />

                              <col width="30px" align="center" />

                              <col width="195px" />

                              <col width="20px" />

                            </colgroup>

                            <tr>

                              <td colspan="3" class="ToolProperty-Literal">

                                1st Dimension:

                              </td>

                              <td colspan="2">

                                <input class="ToolProperty-TxtSelect" style="width:170px" readonly="readonly" avq="text:.Chart.Dimension.0.Field" />

                                <button avq="dropdown:.Chart.Dimension.0.Field" class="ToolProperty-TxtSelectMenu" ></button>

                              </td>

                            </tr>

                            <tr>

                              <td colspan="3" class="ToolProperty-Literal">

                                2nd Dimension:

                              </td>

                              <td colspan="2">

                                <input class="ToolProperty-TxtSelect" style="width:170px" readonly="readonly" avq="text:.Chart.Dimension.1.Field" />

                                <button avq="dropdown:.Chart.Dimension.1.Field" class="ToolProperty-TxtSelectMenu" ></button>

                              </td>

                            </tr>

                            <tr>

                              <td class="ToolProperty-Literal" style="white-space: nowrap;">

                                <span style="padding-right: 15pt;">Measure:</span>

                              </td>

                              <td>

                                <button class="ToolProperty-DialogButton" avq="dlg:.Chart:Expression.qvpp">

                                  <img alt="" icon="web:style" avq="img:.Chart.Expression.0.0.NumberFormat.FormatType" />

                                </button>

                              </td>

                              <td>

                                <button class="ToolProperty-DialogButton" avq="dlg:.Chart.Expression.0.0.NumberFormat:NumberFormat.qvpp">

                                  <img alt="" icon="web:NumberFormat" avq="img:.Chart.Expression.0.0.NumberFormat.FormatType" />

                                </button>

                              </td>

                              <td>

                                <input class="ToolProperty-TxtSelect" style="width:170px" avq="edit:.Chart.Expression.0.0.Definition" />

                              </td>

                              <td>

                                <button class="ToolProperty-DialogButton" avq="dlg:.Chart.Expression.0.0.Definition:Expression.qvpp">

                                  <img alt="" icon="web:more" avq="img:.Chart.Title"/>

                                </button>

                              </td>

                            </tr>

                          </table>

                        </td>

                    </tr>

                  <tr class="ToolProperty-Header" avq="panel::Layout.qvpp">

                        <td>Layout</td>

                        <th></th>

                    </tr>

                    <tr style="display: none">

                        <td colspan="2"></td>

                    </tr>

                    <tr class="ToolProperty-Header" avq="panel::Caption.qvpp">

                        <td>Caption</td>

                        <th></th>

                    </tr>

                    <tr style="display: none">

                        <td colspan="2"></td>

                    </tr>

                    <tr class="ToolProperty-Header" avq="panel::Access.qvpp">

                        <td>Access</td>

                        <th></th>

                    </tr>

                    <tr style="display: none">

                        <td colspan="2"></td>

                    </tr>

                </table>

            </div>