In QlikView version 11 we have made a few additions to the Definition.xml file for extensions. You find a brief description of the file below. Tags and attributes in bold are new for version 11 and won't work in version 10. The rest is the same for both versions.
Use it to define properties that should be available server-side, with the GetExtendedProperty() call.
<Initiate [Name=""] [Value=""] />
Use to initialize standard QlikView properties, like Caption etc.
<PropertiesPage [Version="11"] [File=""] />
New tag in v11. Use it to have a special propererties.qvpp for version 11.
Property Page Generator
QlikView version 11 uses a new format for qvpp files. To simplify extension development it also includes a property page generator, that can generate property pages you can use as they are or use as a starting point for your new qvpp files. There are a few new attributes for this generator:
Label Simply a text to use as label in the property page
Type Choose one of text, select, checkbox or color. Text is the default and will simply create a inputfield. Checkbox will create a checkbox and
color will use the standard QlikView colorpicker. Select will create a HTML select.
Select Values for your select list. Mandatory if Type is select. Comma separated.
SelectLabel Labels for your alternative. Comma separated.
Width Width for your input field, for example "60px"
Multiple Add support for adding and removing Dimensions/Measures. New in Qv 11 SR 1.
Added Multiple attribute for Dimension and Measure (new for Qv 11 SR1)
Edit: If I took the dynprop file, manually edited it and then pointed it to it with the new properties property most things got sorted out
This is great! A bit strange that you have to use the expression tag for the text type. Initial dosen't work if you want to supply some helpful text for the users.
The ability to just add some free text would also be great. If you set the width to zero on a text tag and just use the label you still get the exression icon .
The ability to remove the exression icon would be nice aswell.
If you have a to long label it wont line break and will look pretty ugly
Also if you add multiple <Text Label="Lbel" Type="Text" Expression=""/> only the first expression works when you press the icon. I can manually enter text but if I press the icon and get the expression menu it falls apart.
The purpose behind this post was to doucument what you could do in a Definition.xml, because there was no available documentation and it has some features that are not well known. The only changes in the file for Qv11 are the items marked in bold in the initial post. The attribute Initial is just a flag to QlikView that the Dimension/Measurement should be initialized, the actual content does not matter (just the fact that it exists).
Your last item looks like a bug, but I'm afraid I can't reproduce it. When I create an extension with multiple <Text tags it works as expected. Could you post an example, or mail it to me??
I was wondering why there is no documentation about the parameters in the Definition.xml even though there is a great demand. QlikTech-Internal it has to be defined what parameters are allowed - I just cannot imagine that this page is the "best" "documentation" about this file, I just can't... Otherwise that's really sad!
It's good to know what Tags are allowed, but what are the possible values for the attributes of the tags??
Just for instance:
<Initiate [Name=""] [Value=""] /> --------------------------^ Is there a list of possible "Name"-Values? Like Caption - Caption.what? And what Value-Arguments are allowed?
So can anybody help me out, or do I have to continue with guessing?
Moreover, I cannot understand why there is so few examples from qlikview. I cannot believe that the few examples installed with QlikView desktop are the only ones available. There must be more that were developed internally, even just to test that the extensions work.
The worst is that the lack of documentation is not even replaced by a proper support of their own users community : most of the questions of the integration & extensions forum are never answered.
It would be great if QlikTech provided a real documentation for the extensions API before thinking about adding new features to it....
Now to answer your specific question: you can find the possible "Name" values by looking at the "avq" attribute of the html element of a property page displaying the property.
Here is an example: suppose you want to set the initial width of your extension to 500 pixels.
1) Use firefox with the firebug extension installed to connect to a document with the ajax client.
2) Create a chart and open its properties page
3) Find the text field containing the width, and use the "inspect element" tool from firebug to look at the html code: you'll see that there is an "avq" attribute with the value "prop_editinput:.Layout.Normal.Width". Forget the part before the ":" and keeps the remaining "Layout.Normal.Width".
4) Hooray! You now know how simple it is to have a 500px default width: <Initiate Name="Layout.Normal.Width" Value="500" />
Fortunately it was an easy question, but for most other cases not covered by the documentation you'll have to rely on guessing (firebug is a good tool to assist you in the guessing though).
Actually i'm using Firebug a lot, but in that case it did'nt show me the avq-attributes, just the html of the input field. But your answer gave me a thought-provoking impulse, thanks for that!
It's good to know that I'm not alone with that kind of thoughts 😉 Perhaps we could profit from each other in certain topics. Would be pretty interessting to know what other developers do in such situations...
But I am also starting to get a bit frustrated about the lack of documentation. Took me quite a while to figure out what a "Properties.qvpp" file was in the examples I found. After figuring it out I still cannot find any clear examples, tutorials or documentation on how to properly write one without manually trying to figure out what all these tags mean. A "Property page generator tool" sounds great but I could not find it.
i also couldn't found a "Property page generator tool" and my speculation is, that there isn't such a tool. Instead their is a build in "Property page generator tool" in QlikView. If you format your Definition.xml in the right way QlikView generates on the next click in the properties of this extension a DynProperties.qvpp in the extension folder. For the right format of the Definition.xml i found this Post http://community.qlik.com/message/169635
For example in my Definition.xml missed the Label in the Dimension and Measurement tag, so that QlikView viewed the Properties page in a unformatted way. After adding them, the Properties page looks fine.
So maybe you only need to write the right Definition.xml like defined in this post and you don't have to deal with the Properties.qvpp!?