<?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: qlikview macro about chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187142#M383989</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the following code could you get the number of expressions within a chart (independing if they are active or inactive or hidden from a condition):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.GetSheetObject("CH01")&lt;/P&gt;&lt;P&gt;set cp = chart.GetProperties&lt;/P&gt;&lt;P&gt;expr = cp.Expressions.count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;msgbox expr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and with this count you could loop trough all expressions and read their various properties. For doing this I suggest to use the APIGuide.qvw to get the various possible properties and the right syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Sep 2016 13:05:54 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-09-18T13:05:54Z</dc:date>
    <item>
      <title>qlikview macro about chart</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187141#M383988</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;i have 2 questions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#1&lt;/P&gt;&lt;P&gt;how can i count the number of expressions in macro?&lt;/P&gt;&lt;P&gt;the getcolumncount function can only return count of visible columns&lt;/P&gt;&lt;P&gt;but i want to count all expressions including those hidden by condition expression&lt;/P&gt;&lt;P&gt;i.e. how could i possibly count this -&amp;gt; chart.getproperties.expressions.item &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#2&lt;/P&gt;&lt;P&gt;in this expression, chart.getproperties.expressions.item(0).item(0).data.expressionvisual&lt;/P&gt;&lt;P&gt;the first item(i) refer to the expression (0,1,2,3..)&lt;/P&gt;&lt;P&gt;and how about the second item?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Sep 2016 12:30:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187141#M383988</guid>
      <dc:creator>laujerry</dc:creator>
      <dc:date>2016-09-18T12:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview macro about chart</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187142#M383989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the following code could you get the number of expressions within a chart (independing if they are active or inactive or hidden from a condition):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.GetSheetObject("CH01")&lt;/P&gt;&lt;P&gt;set cp = chart.GetProperties&lt;/P&gt;&lt;P&gt;expr = cp.Expressions.count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;msgbox expr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and with this count you could loop trough all expressions and read their various properties. For doing this I suggest to use the APIGuide.qvw to get the various possible properties and the right syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Sep 2016 13:05:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187142#M383989</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-09-18T13:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview macro about chart</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187143#M383990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you marcus&lt;/P&gt;&lt;P&gt;i have the api.qvw on hand but i find it hard to look for precisely what i need just like what i have asked in this post&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can i find the answer of question 2 in the api qvw?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Sep 2016 15:23:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187143#M383990</guid>
      <dc:creator>laujerry</dc:creator>
      <dc:date>2016-09-18T15:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview macro about chart</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187144#M383991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's definitely not easy and you will need some time to search through the examples and you will need a systematically approach - searching starting within the listbox "Member", looking which entries from the listbox "Class" are possible, selecting one and then deselecting "Member" again, to see which entries belong to the "Class"-selection and so on. Helpful is also to put: =info(Classmember) within a new listbox which meant you could search trough all examples and not only seeing a single one within the example-textbox.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look on the following example you will see that also the attribute-expressions will be assigned to item(0).item(0):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.Activesheet.CreatePivotTable&lt;/P&gt;&lt;P&gt;chart.AddDimension "ProductType"&lt;/P&gt;&lt;P&gt;chart.AddExpression "sum(Amount)"&lt;/P&gt;&lt;P&gt;set cp = chart.GetProperties&lt;/P&gt;&lt;P&gt;set expr = cp.Expressions.Item(0).Item(0).Data&lt;/P&gt;&lt;P&gt;set bce = expr.AttributeExpressions.BkgColorExp&lt;/P&gt;&lt;P&gt;bce.Definition.v = "if(ProductType='Soap', red(), yellow())"&lt;/P&gt;&lt;P&gt;chart.SetProperties cp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore what is the aim to count all expression-parts and/or to read their properties?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another example which might be useful to find a logic for the second item(0) could be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rem this example makes a chart with a subexpression and then shows how to access&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.Sheets("Main").CreateLineChart&lt;/P&gt;&lt;P&gt;chart.AddDimension "ProductType"&lt;/P&gt;&lt;P&gt;chart.AddExpression "sum(Amount)"&lt;/P&gt;&lt;P&gt;chart.AddErrorExpression "stdev(Amount)",0,0&amp;nbsp; 'symmetric error expression&lt;/P&gt;&lt;P&gt;set cp = chart.GetProperties&lt;/P&gt;&lt;P&gt;set expr = cp.Expressions.Item(0).Item(0)&amp;nbsp;&amp;nbsp;&amp;nbsp; ' 1st main expression&lt;/P&gt;&lt;P&gt;for i = 0 to expr.SubExpressions.Count-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(expr.SubExpressions.Item(i).Data.ExpressionData.Definition.v)&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another approach to find the properties and their place within the object-model could be to export the document-layout from the application and to look there within the xml how the object-structure looked like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Sep 2016 16:35:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187144#M383991</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-09-18T16:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: qlikview macro about chart</title>
      <link>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187145#M383992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is not convenient as expected, but thank you for your guidelines &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 04:31:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/qlikview-macro-about-chart/m-p/1187145#M383992</guid>
      <dc:creator>laujerry</dc:creator>
      <dc:date>2016-09-27T04:31:10Z</dc:date>
    </item>
  </channel>
</rss>

