<?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: macro? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/macro/m-p/767618#M1021150</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the variable as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (getfieldselections(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;product&lt;/SPAN&gt;)='&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;apple'&lt;/SPAN&gt;,100,200)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Mar 2015 08:12:44 GMT</pubDate>
    <dc:creator>sagarkharpude</dc:creator>
    <dc:date>2015-03-23T08:12:44Z</dc:date>
    <item>
      <title>macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767617#M1021148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;In macro tab&lt;/P&gt;&lt;P&gt;i want write a condition like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (getfieldselections(product)=apple then 100,200)&lt;/P&gt;&lt;P&gt;so how to write this getfieldselections function in macro tab&lt;/P&gt;&lt;P&gt;if i write like is it work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;whether i have to create variable for this need to use the variable in macro ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if variable has to use then how to mention variable in edit module ( my variable name&amp;nbsp; is vprod)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls tell me ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767617#M1021148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-23T08:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767618#M1021150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the variable as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (getfieldselections(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;product&lt;/SPAN&gt;)='&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;apple'&lt;/SPAN&gt;,100,200)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:12:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767618#M1021150</guid>
      <dc:creator>sagarkharpude</dc:creator>
      <dc:date>2015-03-23T08:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767619#M1021151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set v= ActiveDocument.GetVariable("VariableName")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:14:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767619#M1021151</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-03-23T08:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767620#M1021153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want write condition like getfieldselection(product)=apple&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like this in script &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to write that condotion in macro tab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i created a variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vp=getfieldselections(product)=apple&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now i want use vp variable in&amp;nbsp; Macro script with if condition means like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; vp then 100&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;200&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls tell me to write the script here &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767620#M1021153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-23T08:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767621#M1021155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create the variable in the qv app and call it from macro code following the way I showed above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767621#M1021155</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-03-23T08:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767622#M1021156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;like above my variable is vp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i want use it in if condition&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:35:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767622#M1021156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-23T08:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767623#M1021157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;Set v= ActiveDocument.GetVariable("&lt;STRONG&gt;vp&lt;/STRONG&gt;")&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;v&lt;/STRONG&gt;=100 Then&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //corrected variable name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....do this&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... do that&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Corrected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:41:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767623#M1021157</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-03-23T08:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767624#M1021158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to have multiple&amp;nbsp; value to be selected in Product field and want to identify if selection 'apple' is one of the product selected and then give out 100 as out put then you can use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-style: inherit;"&gt;vp= &lt;/STRONG&gt;if(SubStringCount(Concat(product,'|'), 'apple'),100,200)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in macro vb script you can get the variable value with below syntax&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ActiveDocument.GetVariable("&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vp&lt;/STRONG&gt;")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 08:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767624#M1021158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-23T08:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: macro?</title>
      <link>https://community.qlik.com/t5/QlikView/macro/m-p/767625#M1021159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First you need to create variable in your UI. &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;vProd= if(getfieldselections(product)=apple then 100,200)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can write below code in macro to read the variable value assigned in UI . and use this values anywhere n Macro. &lt;/P&gt;&lt;P&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;DIM &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vProd1&lt;/SPAN&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;vProd1&lt;/SPAN&gt;=ActiveDocument.GetVariable("&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vProd&lt;/SPAN&gt;").GetContent.String&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now you can use &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vProd1 for other calculation &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BKC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 11:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/macro/m-p/767625#M1021159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-23T11:57:11Z</dc:date>
    </item>
  </channel>
</rss>

