<?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 Setting load script variable to previously loaded value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173564#M503681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to set a variable to the value of a field that has been previously loaded in the load script? I'm trying to use a database to drive the configuration of various application settings. I have a table that will always contain one row of configuration data when loaded into QlikView - that table would store the configuration data I'm trying to use in variables. The table structure looks something like this:&lt;/P&gt;&lt;P&gt;ProjectID ConfigSetting1&lt;/P&gt;&lt;P&gt;X Foo&lt;/P&gt;&lt;P&gt;Y Bar&lt;/P&gt;&lt;P&gt;First I load my table into QlikView:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;ConfigTable:&lt;BR /&gt;SQL&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM ConfigTable&lt;BR /&gt;WHERE ProjectID = 'X';&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I then want to use the value of ConfigSetting1 to set a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;SET vConfigSetting1 = ConfigSetting1;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;That syntax doesn't work, so I tried a bunch of variations with SET, LET and dollar-sign expansion, all to no avail. My ultimate goal is to use this variable when building a string so I can conditionally pull in a project-specific include file later in the load script. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;TableWithProjectSpecificLoadLogic:&lt;BR /&gt;$(Include=$(vEnvironment)\Includes\ThisIncludeFile_$(vConfigSetting1).txt);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Dec 2009 03:29:00 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-12-03T03:29:00Z</dc:date>
    <item>
      <title>Setting load script variable to previously loaded value</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173564#M503681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to set a variable to the value of a field that has been previously loaded in the load script? I'm trying to use a database to drive the configuration of various application settings. I have a table that will always contain one row of configuration data when loaded into QlikView - that table would store the configuration data I'm trying to use in variables. The table structure looks something like this:&lt;/P&gt;&lt;P&gt;ProjectID ConfigSetting1&lt;/P&gt;&lt;P&gt;X Foo&lt;/P&gt;&lt;P&gt;Y Bar&lt;/P&gt;&lt;P&gt;First I load my table into QlikView:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;ConfigTable:&lt;BR /&gt;SQL&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM ConfigTable&lt;BR /&gt;WHERE ProjectID = 'X';&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I then want to use the value of ConfigSetting1 to set a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;SET vConfigSetting1 = ConfigSetting1;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;That syntax doesn't work, so I tried a bunch of variations with SET, LET and dollar-sign expansion, all to no avail. My ultimate goal is to use this variable when building a string so I can conditionally pull in a project-specific include file later in the load script. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;TableWithProjectSpecificLoadLogic:&lt;BR /&gt;$(Include=$(vEnvironment)\Includes\ThisIncludeFile_$(vConfigSetting1).txt);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 03:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173564#M503681</guid>
      <dc:creator />
      <dc:date>2009-12-03T03:29:00Z</dc:date>
    </item>
    <item>
      <title>Setting load script variable to previously loaded value</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173565#M503683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LET vConfigSetting1 = peek('ConfigSetting1');&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 03:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173565#M503683</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-12-03T03:35:26Z</dc:date>
    </item>
    <item>
      <title>Setting load script variable to previously loaded value</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173566#M503685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well that was painfully simple. &lt;IMG alt="Tongue Tied" src="http://community.qlik.com/emoticons/emotion-7.gif" /&gt;&lt;/P&gt;&lt;P&gt;Thanks, Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Dec 2009 03:47:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173566#M503685</guid>
      <dc:creator />
      <dc:date>2009-12-03T03:47:50Z</dc:date>
    </item>
    <item>
      <title>Setting load script variable to previously loaded value</title>
      <link>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173567#M503686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a similar question; but not...&lt;/P&gt;&lt;P&gt;I read a table&lt;/P&gt;&lt;P&gt;weekly_times:&lt;/P&gt;&lt;P&gt;Load week1&lt;/P&gt;&lt;P&gt;from weekly_times;&lt;/P&gt;&lt;P&gt;let current_week=peek(week1); /* value is set to WK1010'&lt;/P&gt;&lt;P&gt;now I want to use current_week in various ways - all fail.&lt;/P&gt;&lt;P&gt;load $(current_week) as weektoload&lt;/P&gt;&lt;P&gt;resident weekly_times;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fails with file not found and brings the following message&lt;/P&gt;&lt;P&gt;load WK1010 as weektoload....&lt;/P&gt;&lt;P&gt;it is not using the TEXT WK1010 it seems like it's using the WK1010 as a column name.&lt;/P&gt;&lt;P&gt;I realy want to load 'WK1010' into the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any ideas?&lt;/P&gt;&lt;P&gt;Amarilis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Jun 2010 21:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Setting-load-script-variable-to-previously-loaded-value/m-p/173567#M503686</guid>
      <dc:creator>flores</dc:creator>
      <dc:date>2010-06-09T21:02:32Z</dc:date>
    </item>
  </channel>
</rss>

