<?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 existing field in table in subroutine in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967657#M643746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrew- Unfortunately, the number of columns/fields are not the same and not in the same order in all the excel files so we can not use alpha/numeric (A / @1 as field name) references of field names. My bad, I should have specified this constraint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Dec 2015 14:33:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-12-22T14:33:35Z</dc:date>
    <item>
      <title>load existing field in table in subroutine</title>
      <link>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967654#M643743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0f243e; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;I have two excel files and these have field names invoice number and Invoice amount. Invoice amount is termed as &lt;STRONG&gt;amount&lt;/STRONG&gt; in one file and &lt;STRONG&gt;Money&lt;/STRONG&gt; in another file. I have written a subroutine to load both the excel files in qlikview and I want to specify "&lt;STRONG&gt;if field name is amount then load amount otherwise look for Money and load the existing field as Invoice amount"&lt;/STRONG&gt;. One file can have either field name amount or Money. I am not sure which function should be used in load script. FieldNumber function can't be used as &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; color: #0f243e; font-family: 'Times New Roman', serif; line-height: 1.5em;"&gt;it must not reference the table currently being loaded. I don't want to use ScriptError function. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f243e; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;file1&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;invoice number&lt;/TD&gt;&lt;TD&gt;amount&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;d&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: #0f243e; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;file2&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;invoice number&lt;/TD&gt;&lt;TD&gt;Money&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;e&lt;/TD&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;f&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;g&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;h&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: #0f243e; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f243e; font-size: 12pt; font-family: 'Times New Roman','serif';"&gt;Any help is much appreciated.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 22:32:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967654#M643743</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-21T22:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: load existing field in table in subroutine</title>
      <link>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967655#M643744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe just load your tables, then finally do rename Money field to 'Invoice amount'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * from ...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD * from ...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RENAME FIELD Money TO [Invoice amount];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 22:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967655#M643744</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-12-21T22:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: load existing field in table in subroutine</title>
      <link>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967656#M643745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This script will load both files creating the fieldnames [invoice number] and amount in the resulting resident table. The &lt;EM&gt;header is 1 lines&lt;/EM&gt; qualifier ignores the excel headers and allows you to specify the headers you want for the two fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD A as [invoice number], &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B as amount&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;file1.xlsx // amend filename here or replace with *.xlsx to load both files from common directory&lt;/P&gt;&lt;P&gt;(ooxml, no labels, header is 1 lines, table is Sheet1);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Dec 2015 23:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967656#M643745</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2015-12-21T23:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: load existing field in table in subroutine</title>
      <link>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967657#M643746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Andrew- Unfortunately, the number of columns/fields are not the same and not in the same order in all the excel files so we can not use alpha/numeric (A / @1 as field name) references of field names. My bad, I should have specified this constraint.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Dec 2015 14:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/load-existing-field-in-table-in-subroutine/m-p/967657#M643746</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-22T14:33:35Z</dc:date>
    </item>
  </channel>
</rss>

