A customer asked me today if there was a QVW property for an application description that could be pulled as metadata by his scanner app.
I’ve found that using Variables is a very simple way to define additional metadata.
[qlikview]SET vAppDescription = This is the main Sales app. blah blah;[/qlikview]
A different script can load that variable with this bit of script:
[qlikview]Meta:
LOAD [RawValue] as AppDescription
FROM [some qvw path.qvw]
(XmlSimple, Table is [DocumentSummary/VariableDescription]) WHERE Name = ‘vAppDescription’ ;[/qlikview]
-Rob
Join me at the San Francisco Masters Summit for QikView for more scripting tips.
That looks really interesting but when I try the example code to load from a .qvw file, I get a General Script Error. I must be missing something. (I’m using QlikView version 11.20.11643.0)
Thanks,
-Tim
Tim,
I’m not exactly sure where the problem may be but for starters that is a very old release. It’s the initial release of 11.2 and the current version is SR10. I suggest you upgrade.
Another issue that can crop up is malformed XML in the QVW. QV does not properly escape non-character data. Although in that case I see an “invalid character” error message, not “General Script error”.
I suggest you upgrade if possible and try again.
Hi Rob,
am using this technique since a while, the only onus is that one should be persistant in naming the variables.
If so, you can loop through all directories/files and get a neat compilation of all program-descriptions (and other meta-data associated).
Peter
Thanks for sharing, Rob.
A different approach would be to get this data from the .META files. That is, if the app is published in a QlikView Server and you’ve set a description in the Document Information tab.
An advantage of this would be to be able to manage the app’s description from the QEMC instead of via script, and that users will be able to view this data from the Access Point.
I haven’t tried this myself, but theoretically it should be possible to read the .META files with QlikView, according to this post: http://community.qlik.com/message/111802#111802
-Miguel
Rob,
I get an error message:
Er is een ongeldig teken gevonden in de tekstinhoud.
(invalid character error )
On line number: 5706. On column number: 10. System ID: file:///C:/Users/MVANDE~1/AppData/Local/Temp/qvx38DA.tmp.
This happens on a 32 bit environment with SR11 installed.
However on a 64 bit SR10 environment this error doesn’t appear.
Any idea why? Thanks!