<?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: Variable in Load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630640#M231463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you add a &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop Table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ListOfValues&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P&gt;in the end of the script, you will not change the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 May 2014 09:43:26 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2014-05-28T09:43:26Z</dc:date>
    <item>
      <title>Variable in Load script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630637#M231460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a conditional in Load script as stated below.I want to replace it using some variable or other approach instead of hardcoding the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(EX_NUMBER='RP_EX_15' or EX_NUMBER=&amp;nbsp; 'RP_EX_54' or EX_NUMBER =&amp;nbsp; 'RP_EX_22' OR EX_NUMBER= 'RP_EX_27' OR EX_NUMBER= 'RP_EX_80' or EX_NUMBER ='RP_EX_74' or EX_NUMBER ='RP_EX_76',PRIOR,CURRENT) as Territory,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm able to achieve this by -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET&lt;/STRONG&gt; vEXNUMBER=EX_NUMBER='RP_EX_15' or EX_NUMBER=&amp;nbsp; 'RP_EX_54' or EX_NUMBER =&amp;nbsp; 'RP_EX_22' OR EX_NUMBER= 'RP_EX_27' OR EX_NUMBER= 'RP_EX_80' or EX_NUMBER ='RP_EX_74' or EX_NUMBER ='RP_EX_76';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;If('$(vEXNUMBER)',PRIOR,CURRENT) as Territory,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any other convenient/Better performance way to achieve this??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 08:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630637#M231460</guid>
      <dc:creator />
      <dc:date>2014-05-28T08:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Load script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630638#M231461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would use Exists(). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you first define all values you want to compare with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ListOfValues: Load * Inline&lt;/P&gt;&lt;P&gt;[EX:NUMBER&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RP_EX_15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RP_EX_54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&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;"&gt;then you can use this in your Load:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If( Exists(EX_NUMBER) ,PRIOR, CURRENT) as Territory,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&gt;HIC&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;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 09:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630638#M231461</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-05-28T09:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Load script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630639#M231462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response Henric,&lt;/P&gt;&lt;P&gt;I'm using the same expression in multiple tables.I think Exist ll be fine.But as i'm already moving&amp;nbsp; to Deployment, Bit confused about adding another table to the datamodel.&lt;/P&gt;&lt;P&gt;e.g- in One table it's like-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TBL:&lt;/P&gt;&lt;P&gt;Load RULE_ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SF&amp;amp;'_'&amp;amp; If(EX_NUMBER='RP_EX_15' or EX_NUMBER=&amp;nbsp; 'RP_EX_54' or EX_NUMBER =&amp;nbsp; 'RP_EX_22' OR EX_NUMBER= 'RP_EX_27' OR EX_NUMBER= 'RP_EX_80' or EX_NUMBER ='RP_EX_74' or EX_NUMBER ='RP_EX_76',PRIOR,CURRENT)&amp;amp;'_'&amp;amp;PRODUCT_ID&amp;amp;'_'&amp;amp;CITY as EX_PROD_ID,&lt;/P&gt;&lt;P&gt;COUNTRY,&lt;/P&gt;&lt;P&gt;If(EX_NUMBER='RP_EX_15' or EX_NUMBER=&amp;nbsp; 'RP_EX_54' or EX_NUMBER =&amp;nbsp; 'RP_EX_22' OR EX_NUMBER= 'RP_EX_27' OR EX_NUMBER= 'RP_EX_80' or EX_NUMBER ='RP_EX_74' or EX_NUMBER ='RP_EX_76',PRIOR,CURRENT) as Territory,&lt;/P&gt;&lt;P&gt;ZIP&lt;/P&gt;&lt;P&gt;FROM....;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 09:32:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630639#M231462</guid>
      <dc:creator />
      <dc:date>2014-05-28T09:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Load script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630640#M231463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you add a &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Drop Table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ListOfValues&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P&gt;in the end of the script, you will not change the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 09:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630640#M231463</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-05-28T09:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Load script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630641#M231464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using Match function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;TBL:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load RULE_ID,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SF&amp;amp;'_'&amp;amp; If(Match(EX_NUMBER, 'RP_EX_15', 'RP_EX_54', 'RP_EX_22', 'RP_EX_27', 'RP_EX_80', 'RP_EX_74', 'RP_EX_76'),PRIOR,CURRENT)&amp;amp;'_'&amp;amp;PRODUCT_ID&amp;amp;'_'&amp;amp;CITY as EX_PROD_ID,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;COUNTRY,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If(Match(EX_NUMBER, 'RP_EX_15', 'RP_EX_54', 'RP_EX_22', 'RP_EX_27','RP_EX_80', 'RP_EX_74', 'RP_EX_76'),PRIOR,CURRENT) as Territory,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ZIP&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM....;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 09:46:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630641#M231464</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-05-28T09:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Load script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630642#M231465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep That i did Henric.&lt;/P&gt;&lt;P&gt;I think it's better to go ahead with this instead of Variable.&lt;/P&gt;&lt;P&gt;I have the same EX_NUMBER field which is having all the EX_NUMBER values, But i'm taking a list of values for my expression.That's one think to note down too.I hope that should not be a worry case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ListOfValues:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[EX_NUMBER&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RP_EX_15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;RP_EX_54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&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;"&gt;then you can use this in your&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; Load:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;If( Exists(EX_NUMBER) ,PRIOR, CURRENT) as Territory,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;EX_NUMBER,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;CITY,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;COUNTRY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM...(qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 10:01:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630642#M231465</guid>
      <dc:creator />
      <dc:date>2014-05-28T10:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in Load script</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630643#M231466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jagan,&lt;/P&gt;&lt;P&gt;I had this expression before.&lt;/P&gt;&lt;P&gt;I'm looking for something like variable/Textfile using variable etc. instead of hardcoded values of &lt;STRONG&gt;EX_NUMBER&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 10:03:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-in-Load-script/m-p/630643#M231466</guid>
      <dc:creator />
      <dc:date>2014-05-28T10:03:08Z</dc:date>
    </item>
  </channel>
</rss>

