<?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: How to add variables to a table in a script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141614#M373944</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can also define your variable to accept an input and return an output like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Let IsEmpty = If(Isnull($1),'Yes','No');&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use during load as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(IsEmpty([Field_to_Qualify])) as Flag_Empty,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Aug 2016 15:27:48 GMT</pubDate>
    <dc:creator>jpenuliar</dc:creator>
    <dc:date>2016-08-19T15:27:48Z</dc:date>
    <item>
      <title>How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141612#M373942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Qlikview user&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have declared the following variables in a load script, but I would like them to be stored into a table in the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. &lt;/P&gt;&lt;P&gt;Variables:&lt;/P&gt;&lt;P&gt; $(vField_OPD1_Table) = 'Division';&lt;/P&gt;&lt;P&gt; $(vField_OPD2_Table) = 'Care_Group';&lt;/P&gt;&lt;P&gt;From...........&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone kindly help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:14:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141612#M373942</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2016-08-19T15:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141613#M373943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use variables in your load script like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;$(vField_OPD2_Table) as FieldName&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:20:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141613#M373943</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2016-08-19T15:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141614#M373944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can also define your variable to accept an input and return an output like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Let IsEmpty = If(Isnull($1),'Yes','No');&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use during load as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(IsEmpty([Field_to_Qualify])) as Flag_Empty,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:27:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141614#M373944</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2016-08-19T15:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141615#M373945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have done this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Declared the variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LET vField_OPD1_Table = 'Division';&lt;/P&gt;&lt;P&gt; LET vField_OPD2_Table = 'Care_Group';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Added in a table&lt;/P&gt;&lt;P&gt;DivVar:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;$(vField_OPD2_Table) as 'Divvar',&lt;/P&gt;&lt;P&gt;'DIV' AS 'DivisionName';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However the script is now erroring, do&amp;nbsp; have to have a from or resident clause for my DivVar table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141615#M373945</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2016-08-19T15:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141616#M373946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pippard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so its practically same as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;'Division' as 'Diwar',&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141616#M373946</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2016-08-19T15:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141617#M373947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not the calculated variables try to shift SET from LET&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:37:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141617#M373947</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-19T15:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141618#M373948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is 'Division' a field in your Resident Table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141618#M373948</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2016-08-19T15:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141619#M373949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, Division is in my main fact table and I can resident load it in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However all I want achieve is a table which contains the word "Division" through a variable (Which the variables is doing") and an additional dummy field in the table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I.e. Table results to be in 2 columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Division&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; Div&lt;/P&gt;&lt;P&gt;Division&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; Div&lt;/P&gt;&lt;P&gt;Care_Group&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CG&lt;/P&gt;&lt;P&gt;Care_Group&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CG&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first column will come from the variable and the seocnd column is the dummy field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However my table is failing to load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Helen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ultimately I am try to achieve this: &lt;A href="https://community.qlik.com/docs/DOC-8631"&gt;Set the active field in a cyclic group.qvw&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:44:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141619#M373949</guid>
      <dc:creator>helen_pip</dc:creator>
      <dc:date>2016-08-19T15:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141620#M373950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Helen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;STRONG style="color: #0000ff;"&gt;SET&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: #808080;"&gt;vField_OPD1_Table&lt;/EM&gt;&lt;/STRONG&gt; = 'Division';&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; DivVar:&lt;BR /&gt; &lt;STRONG style="color: #0000ff;"&gt;Load&lt;/STRONG&gt;&lt;BR /&gt; '$(vField_OPD1_Table)' &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Divvar&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;AutoGenerate&lt;/SPAN&gt;(1);&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2016 15:46:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1141620#M373950</guid>
      <dc:creator>tracysmart</dc:creator>
      <dc:date>2016-08-19T15:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to add variables to a table in a script</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1608639#M444939</link>
      <description>&lt;P&gt;Bingo, this did it for me.&amp;nbsp; My code was exactly like the above.&amp;nbsp; Didn't work.&amp;nbsp; But when I switched LET to SET, it worked.&amp;nbsp; IMHO, this is a POS coding syntax.&amp;nbsp; Qlik makes easy things very hard.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The documentation says SET does assignment without calculation.&amp;nbsp; That is, SET assigns a literal.&amp;nbsp; But I have a function call on the right side of the equals sign.&amp;nbsp; In my book that amounts to a calculation.&amp;nbsp; E.g., A + B is a calculation SUM(A, B) would likewise be a calculation.&lt;/P&gt;&lt;P&gt;But, apparently, Qlik doesn't see it that way.&lt;/P&gt;&lt;P&gt;SET v_QVD_last_update = QVDCREATETIME('lib://QVD_Extract\f_qlik_load.qvd');&amp;nbsp; &amp;nbsp; &amp;nbsp;puts the time into the variable.&lt;/P&gt;&lt;P&gt;LET&amp;nbsp; v_QVD_last_update = QVDCREATETIME('lib://QVD_Extract\f_qlik_load.qvd');&amp;nbsp; &amp;nbsp;causes an error when I try to look at the time.&amp;nbsp;&lt;/P&gt;&lt;DIV class="headline edc_error"&gt;&lt;FONT color="#FF0000"&gt;The error occurred here:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;FONT color="#FF0000"&gt;data_load: LOAD *, &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="edc_error"&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2019-08-01 &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;12&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;:03:13 AS QVD_last_update&lt;/FONT&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Aug 2019 16:04:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-add-variables-to-a-table-in-a-script/m-p/1608639#M444939</guid>
      <dc:creator>Steveo250k</dc:creator>
      <dc:date>2019-08-01T16:04:47Z</dc:date>
    </item>
  </channel>
</rss>

