<?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: Reference field from a previously loaded table in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391096#M696465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi other_peoples_shoes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no, unfortunately that doesn't work in my case.&lt;/P&gt;&lt;P&gt;When you say "bottom up" you also mean "right to left" (between tabs), don't you? Weird indeed - but that doesn't work - when I swap the tabs so that the LOAD statement where the field_to_be_referenced is loaded is on the right and the LOAD statement with the field_that_refers_to_it is on the left, the result is the same.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Apr 2013 15:15:12 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2013-04-23T15:15:12Z</dc:date>
    <item>
      <title>Reference field from a previously loaded table in script</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391094#M696463</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;I think a QlikView script is executed top-down and from left to right. Is that correct? I am trying to introduce a new field in a table within the LOAD statement that should be referencing a field from a previously loaded table (the LOAD statement for that table is on a tab to the left of the one I'm editing).&lt;/P&gt;&lt;P&gt;Can anybody lend me a hand there? I can't seem to get it right: I keep getting the script error message &amp;gt;Field not found&amp;lt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, this is what I've got (let's say the table on the left-hand tab is called TABLE_A and the one on the right-hand tab is called TABLE_B (those are the original names):&lt;/P&gt;&lt;P&gt;IF(TABLE_A.TYPE = 'R', TABLE_B.Quantity, 0) as Quantity_net&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why can't QlikView find the field TABLE_A.TYPE at this point?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 14:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391094#M696463</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-04-23T14:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Reference field from a previously loaded table in script</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391095#M696464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Friedrich, Qlikview actually resolves bottom - up, by which I mean that the load statement should be below the one that requires it. Weird, I know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 15:05:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391095#M696464</guid>
      <dc:creator />
      <dc:date>2013-04-23T15:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reference field from a previously loaded table in script</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391096#M696465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi other_peoples_shoes,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no, unfortunately that doesn't work in my case.&lt;/P&gt;&lt;P&gt;When you say "bottom up" you also mean "right to left" (between tabs), don't you? Weird indeed - but that doesn't work - when I swap the tabs so that the LOAD statement where the field_to_be_referenced is loaded is on the right and the LOAD statement with the field_that_refers_to_it is on the left, the result is the same.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 15:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391096#M696465</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-04-23T15:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reference field from a previously loaded table in script</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391097#M696466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Friedrich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I actually meant bottom up and left to right, as far as the tabs go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does your code include a Load Resident statement? The two tables might not be talking to each other. Also, the table.variable syntax is bad form in QV. Try just using variable names.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 15:29:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391097#M696466</guid>
      <dc:creator />
      <dc:date>2013-04-23T15:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Reference field from a previously loaded table in script</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391098#M696467</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;no, there is no RESIDENT load, the two tables are independently loaded from two qvd files. I will try by rearranging the tabs for "left-to-right and bottom-up".&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 07:23:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391098#M696467</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-04-24T07:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reference field from a previously loaded table in script</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391099#M696468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In QlikView loadscript you can't reference a previously loaded field in another LOAD statement just like that - associations start to work when you are done with reloading, not during it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are few rather specific ways you can reference fields from already loaded tables, but generally they boil down to two things:&lt;/P&gt;&lt;P&gt;- resident load - you load an already loaded table again. There is also preceding load, which is the only "bottom up" situation in the script - it is like an optimised resident load, where instead of specifying the resident table to read from it is taken directly from the next LOAD statement.&lt;/P&gt;&lt;P&gt;- inter-record functions (peek, fieldvalue, lookup, etc), which find a value in a previously loaded field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, field names are globally scoped. If you have a field TYPE in TABLE_A, then you refer to it as TYPE. If you try to refer to TABLE_A.TYPE it will throw an error because there is no field named TABLE_A.TYPE (there is no table qualifier part - it is all a variable name, even if you choose to name all fields in TABLE_A to start with TABLE_A. for clarity).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 08:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391099#M696468</guid>
      <dc:creator>kuba_michalik</dc:creator>
      <dc:date>2013-04-24T08:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Reference field from a previously loaded table in script</title>
      <link>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391100#M696469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kuba,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought so, but it's quite a different thing to guess something or to know it for sure. Thanks for the clarification!&lt;/P&gt;&lt;P&gt;I guess the PEEK function that I just read about is the only exception to this rule.&lt;/P&gt;&lt;P&gt;Well, I can do without this, I can edit the formula in my diagram instead. That doesn't work for some reason, but I will make it eventually.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Apr 2013 09:57:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Reference-field-from-a-previously-loaded-table-in-script/m-p/391100#M696469</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2013-04-24T09:57:19Z</dc:date>
    </item>
  </channel>
</rss>

