<?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: load script does not save the variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425056#M813536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the value in variable &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;$(alguskpv_SQL) ? &lt;/STRONG&gt;which is the underlying databse, oracle or SQL server?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Sep 2017 13:20:31 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2017-09-15T13:20:31Z</dc:date>
    <item>
      <title>load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425051#M813531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;Hi,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;I would like to find the highest possible ID in the table of the incremental load script in the document table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;BR /&gt;In the Document_Header table, I see the largest ID but can not be saved as a variable.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt; vMaxDokID is empty&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;What's wrong with me?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Document_Header:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; max(ID)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM "DOCUMENT_HEADER"&lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp; DOCUMENTDATE &amp;lt;=$(alguskpv_SQL)&lt;/P&gt;&lt;P&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMaxDokID= Peek('MaxDokID',0, 'MinMax');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425051#M813531</guid>
      <dc:creator>rein_nigul</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425052#M813532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check your table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Document_Header gives max number also you not use Group By in the table or not once check this or you can try with the resident 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; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Document_Header:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;SQL SELECT&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;*,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;FROM "DOCUMENT_HEADER";&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Store &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Document_Header into &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Document_Header.qvd;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Drop Table &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Document_Header;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MaxTable:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;max(ID)&amp;nbsp;&amp;nbsp; as MaxID&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FROM [DOCUMENT_HEADER]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;WHERE&amp;nbsp; DOCUMENTDATE &amp;lt;= $(alguskpv_SQL)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Group BY ID;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;LET vMaxDokID= Peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MaxTable&lt;/SPAN&gt;',0, '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MaxID&lt;/SPAN&gt;');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 10:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425052#M813532</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-09-15T10:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425053#M813533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Final Script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Document_Header:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;SQL SELECT &lt;/STRONG&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;*,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ID&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;FROM "DOCUMENT_HEADER";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Store &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Document_Header into &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Document_Header.qvd;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;Drop Table &lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Document_Header;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;MaxTable:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;max(ID)&amp;nbsp; as MaxID&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;FROM &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Document_Header&lt;/STRONG&gt;.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;WHERE&amp;nbsp; DOCUMENTDATE &amp;lt;= $(alguskpv_SQL)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Group BY ID;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LET vMaxDokID = Peek('&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;MaxTable&lt;/SPAN&gt;',0, '&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;MaxID&lt;/SPAN&gt;');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 10:20:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425053#M813533</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-09-15T10:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425054#M813534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try This One:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Document_Header:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;max(ID) as MaxID&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM "DOCUMENT_HEADER"&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE&amp;nbsp; DOCUMENTDATE &amp;lt;=$(alguskpv_SQL);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vMaxDokID= Peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MaxID&lt;/SPAN&gt;',0, '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Document_Header&lt;/SPAN&gt;');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 10:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425054#M813534</guid>
      <dc:creator>vinayakg</dc:creator>
      <dc:date>2017-09-15T10:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425055#M813535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that the use of &lt;SPAN style="font-family: 'courier new', courier;"&gt;$(alguskpv_SQL)&lt;/SPAN&gt; in your SQL SELECT WHERE clause isn't in need of some quoting? AFAIK some DBMS don't like naked date specifications as they often look too much like ordinary calculations and will be treated as such...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the document log and have a look at what this WHERE clause expands to. The log file will contain all statement formats &lt;EM&gt;after&lt;/EM&gt; $-sign expansion, which is quite handy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 12:39:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425055#M813535</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-09-15T12:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425056#M813536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the value in variable &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;$(alguskpv_SQL) ? &lt;/STRONG&gt;which is the underlying databse, oracle or SQL server?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 13:20:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425056#M813536</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2017-09-15T13:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425057#M813537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;MaxTable:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;Load&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;max(ID)&amp;nbsp; as MaxID&lt;/SPAN&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit;"&gt;FROM &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Document_Header&lt;/STRONG&gt;.qvd&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;WHERE&amp;nbsp; DOCUMENTDATE &amp;lt;= $(alguskpv_SQL);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LET vMaxDokID = Peek('&lt;STRONG style="font-style: inherit; font-weight: inherit;"&gt;MaxID&lt;/STRONG&gt;',0, '&lt;STRONG style="font-style: inherit;"&gt;MaxTable&lt;/STRONG&gt;');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 13:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425057#M813537</guid>
      <dc:creator>florentina_doga</dc:creator>
      <dc:date>2017-09-15T13:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425058#M813538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN&gt;syntax peek is&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor48"&gt;&lt;/A&gt;&lt;A name="peek"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;peek(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;fieldname [ , row [ , tablename ] ] &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the contents of the &lt;SPAN class="Italic"&gt;fieldname&lt;/SPAN&gt; in the record specified by &lt;SPAN class="Italic"&gt;row&lt;/SPAN&gt; in the internal table &lt;SPAN class="Italic"&gt;tablename&lt;/SPAN&gt;. Data are fetched from the associative QlikView database. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;Fieldname&lt;/SPAN&gt; must be given as a string (e.g. a quoted literal). &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;Row&lt;/SPAN&gt; must be an integer. 0 denotes the first record, 1 the second and so on. Negative numbers indicate order from the end of the table. -1 denotes the last record read. &lt;/P&gt;&lt;P&gt;If no &lt;SPAN class="Italic"&gt;row&lt;/SPAN&gt; is stated, -1 is assumed. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;Tablename&lt;/SPAN&gt; is a table label, see &lt;A _jive_internal="true" class="MCXref_0" href="https://community.qlik.com/thread/Table_labels.htm"&gt;&lt;EM&gt;Table Labels&lt;/EM&gt;&lt;/A&gt;, without the ending colon. If no &lt;SPAN class="Italic"&gt;tablename&lt;/SPAN&gt; is stated, the current table is assumed. If used outside the load statement or referring to another table, the tablename must be included. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 13:45:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425058#M813538</guid>
      <dc:creator>florentina_doga</dc:creator>
      <dc:date>2017-09-15T13:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425059#M813539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to load the MaxID from this table?-&amp;gt; Document_Header if yes, you have to include the table name in the peek like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Document_Header:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT&lt;/P&gt;&lt;P style="font-size: 13px; 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; max(ID)&amp;nbsp;&amp;nbsp; AS MaxDokID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM "DOCUMENT_HEADER"&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE&amp;nbsp; DOCUMENTDATE &amp;lt;= &lt;STRONG&gt;'$(alguskpv_SQL)'&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LET vMaxDokID= Peek('MaxDokID',0, 'Document_Header');&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 13:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425059#M813539</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-09-15T13:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425060#M813540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Unable to save the highest value of the vMaxDokID to the variable&lt;BR /&gt;&lt;BR /&gt;The vMaxDokID variable is empty, which is wrong?&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the following Load script;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Document_Header:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;* &lt;/P&gt;&lt;P&gt;Inline [&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Document_ID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;max(ID) as MaxID&lt;/P&gt;&lt;P&gt;Resident Document_Header;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMaxDokID = Peek('MaxID', 0 , 'Document_Header');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Drop Table Document_Header;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 17:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425060#M813540</guid>
      <dc:creator>rein_nigul</dc:creator>
      <dc:date>2017-09-15T17:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425061#M813541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Document_Header:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Inline [&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LEFT JOIN (Document_Header)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Document_ID:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;max(ID) as MaxID&lt;/P&gt;&lt;P&gt;Resident Document_Header;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMaxDokID = Peek('MaxID', 0 , 'Document_Header');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Document_Header;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF you do not use the JOIN it will create two tables 1, Document_Header and 2, Document_ID. So when the variable is reading from Document_Header there is no field MaxID hence no data in it. You can also try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Document_Header:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;Inline [&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//LEFT JOIN (Document_Header)&lt;/P&gt;&lt;P&gt;Document_ID:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;max(ID) as MaxID&lt;/P&gt;&lt;P&gt;Resident Document_Header;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET vMaxID = Peek('MaxID', 0 , 'Document_ID');&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Document_Header, Document_ID;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 18:01:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425061#M813541</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2017-09-15T18:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425062#M813542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The below code will retain the maxid in the variable vMaxDokID. Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Document_Header:&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MaxID&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Load&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; * &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; ID&lt;BR /&gt; 0&lt;BR /&gt; 1&lt;BR /&gt; 2&lt;BR /&gt; 3&lt;BR /&gt; 4&lt;BR /&gt; 5&lt;BR /&gt; 6&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LET&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;vMaxDokID&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('MaxID'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/176796_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 18:20:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425062#M813542</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2017-09-15T18:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425063#M813543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rein, The first parameter of Peek is the field name, second the index (starting at zero), and 3rd the table name, so, if you don't assign an alias to max(ID) the field will be called 'max(ID)' -or 'MAX(ID)'?- and the table is '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Document_Header', so based on the script in the first post&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Document_Header&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;max(ID) &lt;/STRONG&gt; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM "DOCUMENT_HEADER"&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE&amp;nbsp; DOCUMENTDATE &amp;lt;=$(alguskpv_SQL)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vMaxDokID= Peek('&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;max(ID)&lt;/STRONG&gt;&lt;/SPAN&gt;',0, '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Document_Header&lt;/STRONG&gt;&lt;/SPAN&gt;');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 18:29:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425063#M813543</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2017-09-15T18:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: load script does not save the variable</title>
      <link>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425064#M813544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do this step by step. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Does the SQL SELECT generate a table with a Max value (use the Table Viewer to check this by pressing Ctrl-T)? If so, note the &lt;SPAN style="text-decoration: underline;"&gt;table name&lt;/SPAN&gt;, and the &lt;SPAN style="text-decoration: underline;"&gt;field name&lt;/SPAN&gt;. If not, check whether the ID field contains numerical data. Max() won't work on string representations. In the latter case it will generate a table with a single record containing a single NULL value.&lt;BR /&gt;How to check that the ID values are OK? Put the ID field in a listbox on a sheet. All values should be right-aligned.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;If the table really contains your MaxID value and the value is correct, go to the next statement with the Peek() call. Follow the instructions provided by Ruben. You can omit the third parameter from the call (the table name) if the field name only exists in the table that contains your Max value. The LET statement becomes pretty simple, but you have to correctly specify the field name as present in the table. Use the Table Viewer (Ctrl-T) to check the name.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's fairly easy to debug this, if you do it step-by-step.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 20:01:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-script-does-not-save-the-variable/m-p/1425064#M813544</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-09-15T20:01:55Z</dc:date>
    </item>
  </channel>
</rss>

