<?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 do VB function processes the variables LOAD Scriptis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623590#M681372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load script is &lt;/P&gt;&lt;P&gt;stock:&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, DATETIME, QUANTITY, PRODUCT_ID, SUPPLIER_ID, DIRECTION&lt;/P&gt;&lt;P&gt;1, 9.05.2012, 50, 5, 6361, IN&lt;/P&gt;&lt;P&gt;2, 5.06.2012, 16, 5, , OUT&lt;/P&gt;&lt;P&gt;3, 21.06.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;4, 11.07.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;5, 18.07.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;6, 24.07.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;7, 24.07.2012, 3, 5, , OUT&lt;/P&gt;&lt;P&gt;8, 25.07.2012, 4, 5, , OUT&lt;/P&gt;&lt;P&gt;9, 15.08.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;10, 2.10.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;11, 12.10.2012, 35, 5, 6364, IN&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;Tarn_temp:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;test(QUANTITY) as AllQuantity&lt;/P&gt;&lt;P&gt;resident stock;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit Module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function test(quantity)&lt;/P&gt;&lt;P&gt;'Function test()&amp;nbsp; 'testing&lt;/P&gt;&lt;P&gt;'quantity=5&amp;nbsp; 'testing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vbInQuantity") 'read variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vbInQuantity =v.GetContent.String&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' msgbox(vbInQuantity) 'testing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vbInQuantity=quantity+vbInQuantity&lt;/P&gt;&lt;P&gt;&amp;nbsp; set v = ActiveDocument.Variables("vbInQuantity")' write varaible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v.SetContent vbInQuantity,true&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; end function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Apr 2014 13:04:01 GMT</pubDate>
    <dc:creator>rein_nigul</dc:creator>
    <dc:date>2014-04-11T13:04:01Z</dc:date>
    <item>
      <title>How do VB function processes the variables LOAD Scriptis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623587#M681369</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 want to check in the table for each row of data to calculate the reading of one of the cell. &lt;/P&gt;&lt;P&gt;In order to do this, I decided to use a VB function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function getVariable()&lt;/P&gt;&lt;P&gt;&amp;nbsp; set v = ActiveDocument.GetVariable("vVariable")&lt;/P&gt;&lt;P&gt;&amp;nbsp; getVariable = v.GetContent.String&lt;/P&gt;&lt;P&gt;end function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the Edit module, by testing all of the works (by giving the corresponding value), then Load scriptis is resulting in "-"&lt;/P&gt;&lt;P&gt;How to use variables in data processing, and then LOAD the scripts calculated to save variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 13:19:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623587#M681369</guid>
      <dc:creator>rein_nigul</dc:creator>
      <dc:date>2014-04-10T13:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do VB function processes the variables LOAD Scriptis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623588#M681370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rein,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How you use it in the script?&amp;nbsp; Can you show this part of the script?&lt;/P&gt;&lt;P&gt;More important - why do you need this function at all?&amp;nbsp; Variable can be used in the script directly...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Apr 2014 18:25:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623588#M681370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-10T18:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do VB function processes the variables LOAD Scriptis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623589#M681371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to process the warehouse data so that I can analyze sales by suppliers on the sales documents.&lt;/P&gt;&lt;P&gt;The initial data is missing this information.&lt;/P&gt;&lt;P&gt;The supplier information is only available on the incoming documents&lt;/P&gt;&lt;P&gt;I want to save the incoming quantity and supplier information into the product variables when making the incoming document, and take the supplier name from the variables when creating a sales document&lt;/P&gt;&lt;P&gt;What makes this difficult is that when a new supplier is created and products are taken in, the quantity is not zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to use VB macro, which reads in the variable value, processes the variable and then I save the variable value. It works when testing in the edit module, variables are read and saved, but the function does not work in the LOAD script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rein&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 12:56:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623589#M681371</guid>
      <dc:creator>rein_nigul</dc:creator>
      <dc:date>2014-04-11T12:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do VB function processes the variables LOAD Scriptis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623590#M681372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Load script is &lt;/P&gt;&lt;P&gt;stock:&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, DATETIME, QUANTITY, PRODUCT_ID, SUPPLIER_ID, DIRECTION&lt;/P&gt;&lt;P&gt;1, 9.05.2012, 50, 5, 6361, IN&lt;/P&gt;&lt;P&gt;2, 5.06.2012, 16, 5, , OUT&lt;/P&gt;&lt;P&gt;3, 21.06.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;4, 11.07.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;5, 18.07.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;6, 24.07.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;7, 24.07.2012, 3, 5, , OUT&lt;/P&gt;&lt;P&gt;8, 25.07.2012, 4, 5, , OUT&lt;/P&gt;&lt;P&gt;9, 15.08.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;10, 2.10.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;11, 12.10.2012, 35, 5, 6364, IN&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join&lt;/P&gt;&lt;P&gt;Tarn_temp:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;ID,&lt;/P&gt;&lt;P&gt;test(QUANTITY) as AllQuantity&lt;/P&gt;&lt;P&gt;resident stock;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit Module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function test(quantity)&lt;/P&gt;&lt;P&gt;'Function test()&amp;nbsp; 'testing&lt;/P&gt;&lt;P&gt;'quantity=5&amp;nbsp; 'testing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set v = ActiveDocument.Variables("vbInQuantity") 'read variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vbInQuantity =v.GetContent.String&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' msgbox(vbInQuantity) 'testing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vbInQuantity=quantity+vbInQuantity&lt;/P&gt;&lt;P&gt;&amp;nbsp; set v = ActiveDocument.Variables("vbInQuantity")' write varaible&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; v.SetContent vbInQuantity,true&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; end function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 13:04:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623590#M681372</guid>
      <dc:creator>rein_nigul</dc:creator>
      <dc:date>2014-04-11T13:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do VB function processes the variables LOAD Scriptis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623591#M681373</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;You can do all of that in a single load and no module:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp; DATETIME, &lt;/P&gt;&lt;P&gt;&amp;nbsp; QUANTITY, &lt;/P&gt;&lt;P&gt;&amp;nbsp; QUANTITY + $(vbInQuantity) As AllQuantity,&lt;/P&gt;&lt;P&gt;&amp;nbsp; PRODUCT_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp; SUPPLIER_ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp; DIRECTION&lt;/P&gt;&lt;P&gt;inline [&lt;/P&gt;&lt;P&gt;ID, DATETIME, QUANTITY, PRODUCT_ID, SUPPLIER_ID, DIRECTION&lt;/P&gt;&lt;P&gt;1, 9.05.2012, 50, 5, 6361, IN&lt;/P&gt;&lt;P&gt;2, 5.06.2012, 16, 5, , OUT&lt;/P&gt;&lt;P&gt;3, 21.06.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;4, 11.07.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;5, 18.07.2012, 1, 5, , OUT&lt;/P&gt;&lt;P&gt;6, 24.07.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;7, 24.07.2012, 3, 5, , OUT&lt;/P&gt;&lt;P&gt;8, 25.07.2012, 4, 5, , OUT&lt;/P&gt;&lt;P&gt;9, 15.08.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;10, 2.10.2012, 2, 5, , OUT&lt;/P&gt;&lt;P&gt;11, 12.10.2012, 35, 5, 6364, IN&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS - this assumes (as does your example) that vbInQuantity is initialised to some value (not null).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 13:09:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623591#M681373</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-04-11T13:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do VB function processes the variables LOAD Scriptis</title>
      <link>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623592#M681374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is - use variable in the script directly, no function's needed &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Apr 2014 13:39:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-do-VB-function-processes-the-variables-LOAD-Scriptis/m-p/623592#M681374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-11T13:39:02Z</dc:date>
    </item>
  </channel>
</rss>

