Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Like the bullet chart that came with the Extension Examples in QV11 (attached), I want to have an extension that has multiple expressions, but the number of expressions needs to be fixed (I specifically want 4--the bullet chart has 5). I am able to get extensions to work that contain only one expression, and I am able to use [Multiple=""] to let the user define the number of expressions, but when I try to predefine a fixed number of expressions that is greater than 1, QlikView only keeps the first expression (you can see this in the bullet chart properties--if you type something into Measurement2, Measurement3, Measurement4, or Measurement5, close the properties window, and open the properties window again, whatever you typed into Measurements 2, 3, 4, and 5 is gone). Am I doing something incorrect, or is this a bug? If it's a bug, is there a known workaround? Thanks for your help!
Yes, I'm afraid it's a bug.
In a autogenerated properties page only the first measure will work. The reason is that the generated code for the second measure is:
<div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.0.1.Definition'></div>
it should be:
<div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.1.0.Definition'></div>
There is a workaround: Make a copy of DynProperties.qvpp, correct the line(s) that are wrong, and add a reference to the corrected qvpp file in your Definition.xml:
<ExtensionObject Label="Bullet Chart" Description="Bullet Chart" PropertiesPage="Properties2.qvpp"
Erik
Yes, I'm afraid it's a bug.
In a autogenerated properties page only the first measure will work. The reason is that the generated code for the second measure is:
<div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.0.1.Definition'></div>
it should be:
<div class='prop-grid_span-7 prop-grid_last' style='width:94%;' avq='prop_editexpression:.Chart.Expression.1.0.Definition'></div>
There is a workaround: Make a copy of DynProperties.qvpp, correct the line(s) that are wrong, and add a reference to the corrected qvpp file in your Definition.xml:
<ExtensionObject Label="Bullet Chart" Description="Bullet Chart" PropertiesPage="Properties2.qvpp"
Erik
Thank you, Erik! It worked like a charm.
Here is the fixed bullet chart code in case anyone else needs it.
Thanks again!
There seems to be a bug in the 32bit version, that does not exist in the 64bit version.
Can you confirm this?
I'm using QV 11 SR1
Definition.xml
<Measurement Label="Pin Label" Initial="" />
<Measurement Label="Color Expression" Initial="" />
<Initiate Name="Chart.Expression.0.0.Definition" value="=Cap_CapName & ' (' & Cap_AdminArea & ')'" />
<Initiate Name="Chart.Expression.1.0.Definition" value="=If(Ctry_PopPerKm2 > 100, '#ff0000', If(Ctry_PopPerKm2 >= 20, '#ffff00', If(Ctry_PopPerKm2 < 20, '#00ff00')))" />
DynProperties.qypp is generated correctly
<input class='prop-grid_checkbox prop-expression-input' type='text' style='width:94%;' avq='edit:.Chart.Expression.0.0.Definition' />
<span propicontype='expression' avq='dlgprop:.Chart.Expression.0.0.Definition:Expression.qvpp'></span>
<input class='prop-grid_checkbox prop-expression-input' type='text' style='width:94%;' avq='edit:.Chart.Expression.1.0.Definition' />
<span propicontype='expression' avq='dlgprop:.Chart.Expression.1.0.Definition:Expression.qvpp'></span>
But the properties look like this:
I figured it out.
I checked DynProperties.qypp created by the 64bit version only.
But 32bit version overwrites this.
So setting the PropertiesPage attribute, as you suggested, solved it.
Thank you so much ! I have been trying to debug the code for the bullet chart, which comes with the 64 bit installation. However, as described above, only the first expression persisted and remaining were lost. Your code works like a charm !
Is there a limit to include expression Mesurement on the Definition.xml? I managed put just 4 expression, when I create more expression, the Measurement5, Measurement6 don´t work. Some help??
There shouldn't be a limit. I have an extension with 9 and it works fine.
Ok. I discovered my problem. I think that my problem was with the cache. I did this steps and it worked
1. Delete the extension from the .qvw that I'm using it on.
2. Hit F5 to refresh the extensions.
3. Save the .qvw.
4. Close QlikView completely.
5. Reopen QlikView and your .qvw.
6. Hit F5 again.
7. Remake the extension object.
thanks.
The following of your steps should be enough to get it to work:
caleb souza wrote:
1. Delete the extension from the .qvw that I'm using it on.
2. Hit F5 to refresh the extensions.
3. Save the .qvw.
4. Close QlikView completely.
5. Reopen QlikView and your .qvw.
6. Hit F5 again.
7. Remake the extension object.
(You need to do this any time you change the Definition.xml file.)