<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Tweak Document Analyzer (2.8) to scrape renamed dimensions names in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239531#M874064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Margaret,&lt;/P&gt;&lt;P&gt;You are my new development partner! I'm the author of Document Analyzer. I understand your requirement and I'm happy to integrate it into the next version. Please reach out to me at the contact form &lt;A href="http://qlikviewcookbook.com/contact/" title="http://qlikviewcookbook.com/contact/"&gt;http://qlikviewcookbook.com/contact/&lt;/A&gt; and we can collaborate on this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re your followup question:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"Is there a good way to scrape qlikview scripts to track how a field is renamed?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;That would be wonderful, wouldn't it? Complete field-level lineage. There is no &lt;EM&gt;simple&lt;/EM&gt; way I know of.&amp;nbsp; I'm aware of at least two vendors working on it, but don't know how far along they are in the process. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2016 03:21:53 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2016-11-16T03:21:53Z</dc:date>
    <item>
      <title>Tweak Document Analyzer (2.8) to scrape renamed dimensions names</title>
      <link>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239530#M874062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Background Info:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm working on a documentation initiative at my company.&amp;nbsp; Part of that initiative is to write glossaries for our production documents that define all of the dimensions included in the documents.&amp;nbsp; To do that, I needed to take an inventory of all the fields a document uses, which is simple enough using the Document Analyzer.&amp;nbsp; I also needed to track how the fields were renamed in the interface.&amp;nbsp; I did the first few manually by looking at every view in the documents and writing stuff down... which is a little silly, given the range of powerful tools at my disposal.&amp;nbsp; I wanted to use the Document Analyzer 2.8 to link all of the Dimension Names to all of the ways that they were renamed in the interface (I called these intname in the macros, short for InterfaceName).&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;I am primarily concerned with renamed fields in Graphs, Listboxes, Multiboxes, and Table Boxes, though other objects likely work in a similar way.&amp;nbsp; &lt;/SPAN&gt;I'm relatively new to Qlikview, and have no experience in VB Script or XML; please let me know if you can think of a way to improve my work, or expand upon it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Steps:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm working with Document Analyzer 2.8.&amp;nbsp; Here are the macros I tweaked; I've added the lines in cyan text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Rem *** xpath expressions used to find Dimensions&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sub buildDimensionXPath&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; dimensionXPath = buildXPath(dimensionXPath, "//*/PseudoDef") ' Graph&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; dimensionXPath = buildXPath(dimensionXPath, "//*/Def") ' Listbox&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt; &lt;SPAN style="color: #339966;"&gt; &lt;SPAN style="color: #33cccc;"&gt;dimensionXPath = buildXPath(dimensionXPath, "//*/MultiBoxMemberAttributes") 'Multi Box&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; dimensionXPath = buildXPath(dimensionXPath, "//*/Name1") ' Slider&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; dimensionXPath = buildXPath(dimensionXPath, "//*/Field") ' Table Box&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;End Sub&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Rem *** Extract the dimensions from an XML DOM&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sub extractDimensions(id)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; log "Extracting Dimensions"&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set objNodeList = xmlDoc.documentElement.selectNodes(dimensionXPath)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; For Each node in objNodeList&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set child = node.selectSingleNode(".//Name")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; If child Is Nothing Then name = Null Else name = child.Text&amp;nbsp; &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set child =&amp;nbsp; node.selectSingleNode(".//Type")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; If child Is Nothing Then dtype = Null&amp;nbsp; Else dtype = child.Text &lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; &lt;SPAN style="color: #33cccc;"&gt;Set child =&amp;nbsp; node.selectSingleNode("..//Title/v")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #33cccc;"&gt;&amp;nbsp; If child Is Nothing Then Set child = node.selectSingleNode(".//Label/v") &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;SPAN style="color: #33cccc;"&gt;&amp;nbsp; If child Is Nothing Then intname = Null&amp;nbsp; Else intname = child.Text&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; If Not IsNull(name) Then Call writeDimension(id, name, dtype&lt;SPAN style="color: #33cccc;"&gt;, intname&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Next&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;End Sub&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Rem *** Write info for a Dimension to external file&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sub writeDimension(id, name, dtype&lt;SPAN style="color: #33cccc;"&gt;, intname&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; dimensionsFile.WriteLine( _&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; csvQuote(id) _&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; &amp;amp; "," &amp;amp; csvQuote(dtype) _&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; &amp;amp; "," &amp;amp; csvQuote(name) _&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; &lt;SPAN style="color: #33cccc;"&gt;&amp;amp; "," &amp;amp; csvQuote(intname) _&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; )&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Rem *** Open and prime all Global Files&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Sub openGlobalFiles(outputDir)&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set sheetsFile = openOutputFile(outputDir &amp;amp; "sheets.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; sheetsFile.WriteLine("SheetId, SheetName")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set objectsFile = openOutputFile(outputDir &amp;amp; "objects.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; objectsFile.WriteLine("SheetId, ObjectId, ObjectType, Caption, HelpText")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set dimensionsFile = openOutputFile(outputDir &amp;amp; "dimensions.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; dimensionsFile.WriteLine("ObjectId, DimensionType, DimensionName&lt;SPAN style="color: #33cccc;"&gt;, InterfaceName&lt;/SPAN&gt;")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set expressionsFile = openOutputFile(outputDir &amp;amp; "expressions.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; expressionsFile.WriteLine("ObjectId, Parent, Expression")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set actionsFile = openOutputFile(outputDir &amp;amp; "actions.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; actionsFile.WriteLine("ActionLocation, ActionLocationId, ActionType, ActionParameters")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set fontsFile = openOutputFile(outputDir &amp;amp; "fonts.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; fontsFile.WriteLine("ObjectId, Font, FontElement, FontSize")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set groupsFile = openOutputFile(outputDir &amp;amp; "groups.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; groupsFile.WriteLine("GroupName, GroupType, GroupField")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; Set docinfoFile = openOutputFile(outputDir &amp;amp; "docinfo.csv")&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; docinfoFile.WriteLine("DocPath, DocOpenDuration, DocAnalysisDatetime, PrjUsed, GenerateLogfile, DaExtractQvVersion")&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll notice the extra line of logic in the extractDimensions sub.&amp;nbsp; I added it for multiboxes. When a dimension in a multibox is renamed, that information is stored before the dimension name and type, and it does not following the ".//Title/v" pattern.&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;From there, it's straight forward to tweak the Document Analyzer load script to pull in the interface names.&amp;nbsp; I haven't played around with scraping the Interface Names from other objects, though I assume that it's possible.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sources:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I looked at this article to play around with the XML xpaths:&lt;/P&gt;&lt;P&gt;&lt;A href="https://msdn.microsoft.com/en-us/library/ms256086(v=vs.110).aspx" title="https://msdn.microsoft.com/en-us/library/ms256086(v=vs.110).aspx" target="_blank"&gt;https://msdn.microsoft.com/en-us/library/ms256086(v=vs.110).aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can find Document Analyzer 2.8 here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/212918" target="_blank"&gt;Document Analyzer V2.8 Update Available&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Follow Up Question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Is there a good way to scrape qlikview scripts to track how a field is renamed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Happy hunting,&lt;/P&gt;&lt;P&gt;Margaret&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239530#M874062</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Tweak Document Analyzer (2.8) to scrape renamed dimensions names</title>
      <link>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239531#M874064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Margaret,&lt;/P&gt;&lt;P&gt;You are my new development partner! I'm the author of Document Analyzer. I understand your requirement and I'm happy to integrate it into the next version. Please reach out to me at the contact form &lt;A href="http://qlikviewcookbook.com/contact/" title="http://qlikviewcookbook.com/contact/"&gt;http://qlikviewcookbook.com/contact/&lt;/A&gt; and we can collaborate on this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re your followup question:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"Is there a good way to scrape qlikview scripts to track how a field is renamed?"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;That would be wonderful, wouldn't it? Complete field-level lineage. There is no &lt;EM&gt;simple&lt;/EM&gt; way I know of.&amp;nbsp; I'm aware of at least two vendors working on it, but don't know how far along they are in the process. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 03:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239531#M874064</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-11-16T03:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Tweak Document Analyzer (2.8) to scrape renamed dimensions names</title>
      <link>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239532#M874065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Margaret,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension labels are now available in v3.2 of Document Analyzer. Download here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/recipes/download-info/document-analyzer/" title="http://qlikviewcookbook.com/recipes/download-info/document-analyzer/"&gt;Search Recipes | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2016 00:34:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239532#M874065</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-11-29T00:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Tweak Document Analyzer (2.8) to scrape renamed dimensions names</title>
      <link>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239533#M874066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Super cool!&amp;nbsp; Thank you for adding that!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 15:14:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tweak-Document-Analyzer-2-8-to-scrape-renamed-dimensions-names/m-p/1239533#M874066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T15:14:47Z</dc:date>
    </item>
  </channel>
</rss>

