<?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 VBScript Member for Expression Background Color in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/241966#M92357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know the VB syntax is to set the background color for an expression?&lt;/P&gt;&lt;P&gt;For instance, if I want to write a macro to set the expression definition I would write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Set tbl = ActiveDocument.GetSheetObject("table")&lt;BR /&gt;Set exp = tbl.GetProperties&lt;BR /&gt;Set definition = exp.Expression.Item(0).Item(0).Data.ExpressionData.Definition&lt;BR /&gt;definition.v = "Sum(variable)"&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;How would I do the same thing to set the background for that expression? I tried the APIGuide but can't seem to find any answers there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Mar 2011 22:25:03 GMT</pubDate>
    <dc:creator>ysiroong</dc:creator>
    <dc:date>2011-03-08T22:25:03Z</dc:date>
    <item>
      <title>VBScript Member for Expression Background Color</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/241966#M92357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know the VB syntax is to set the background color for an expression?&lt;/P&gt;&lt;P&gt;For instance, if I want to write a macro to set the expression definition I would write:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Set tbl = ActiveDocument.GetSheetObject("table")&lt;BR /&gt;Set exp = tbl.GetProperties&lt;BR /&gt;Set definition = exp.Expression.Item(0).Item(0).Data.ExpressionData.Definition&lt;BR /&gt;definition.v = "Sum(variable)"&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;How would I do the same thing to set the background for that expression? I tried the APIGuide but can't seem to find any answers there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 22:25:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/241966#M92357</guid>
      <dc:creator>ysiroong</dc:creator>
      <dc:date>2011-03-08T22:25:03Z</dc:date>
    </item>
    <item>
      <title>VBScript Member for Expression Background Color</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/241967#M92358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have not tried this but I think this will do the trick: (this is from the APIGuide; not sure if you already tried this).&lt;/P&gt;&lt;P&gt;set chart = ActiveDocument.ActiveSheet.CreateStraightTable&lt;BR /&gt;chart.AddDimension "Customer"&lt;BR /&gt;chart.AddDimension "ProductType"&lt;BR /&gt;chart.AddExpression "sum(Amount)"&lt;BR /&gt;set cp = chart.GetProperties&lt;BR /&gt;set expr = cp.Expressions.Item(0).Item(0).Data.ExpressionVisual&lt;BR /&gt;expr.Label.v = "Sales"&lt;BR /&gt;expr.LabelAdjust = 2&lt;BR /&gt;expr.VisualCues.LowLimit.v = 10&lt;BR /&gt;expr.VisualCues.LowCue.Color.Col = RGB(255,0,0) 'red&lt;BR /&gt;expr.VisualCues.LowCue.FontStyleMod = 2 'bold&lt;BR /&gt;expr.VisualCues.LowCue.SizeMod = 1 '+20%&lt;BR /&gt;chart.SetProperties cp&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 01:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/241967#M92358</guid>
      <dc:creator />
      <dc:date>2011-03-09T01:26:42Z</dc:date>
    </item>
    <item>
      <title>VBScript Member for Expression Background Color</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/241968#M92359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found the member. It's AttributeExpressions under the IExpressionDataEx class. From the APIGuide:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;set chart = ActiveDocument.Activesheet.CreatePivotTable&lt;BR /&gt;chart.AddDimension "ProductType"&lt;BR /&gt;chart.AddExpression "sum(Amount)"&lt;BR /&gt;set cp = chart.GetProperties&lt;BR /&gt;set expr = cp.Expressions.Item(0).Item(0).Data&lt;BR /&gt;set bce = expr.AttributeExpressions.BkgColorExp&lt;BR /&gt;bce.Definition.v = "if(ProductType='Soap', red(), yellow())"&lt;BR /&gt;chart.SetProperties cp&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 14:06:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/241968#M92359</guid>
      <dc:creator>ysiroong</dc:creator>
      <dc:date>2011-03-09T14:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript Member for Expression Background Color</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/1642999#M447312</link>
      <description>&lt;P&gt;Thanks, dude! You've saved me!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 10:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-Member-for-Expression-Background-Color/m-p/1642999#M447312</guid>
      <dc:creator>a_yershov</dc:creator>
      <dc:date>2019-11-05T10:21:58Z</dc:date>
    </item>
  </channel>
</rss>

