<?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: MAPPING old records to new records. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123282#M630134</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You code looks OK . Can you elaborate on what gets dropped ? as you haven't used any DROP statement and you are simply appending the newcode with the oldcode &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jul 2016 09:32:02 GMT</pubDate>
    <dc:creator>qliksus</dc:creator>
    <dc:date>2016-07-22T09:32:02Z</dc:date>
    <item>
      <title>MAPPING old records to new records.</title>
      <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123280#M630132</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 have a requirement to link transactions in an old ERP system, to records in a new ERP system, so that we can join purchasing history at the front end, for the end user. Example;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Old Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; New Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; New Name&lt;/P&gt;&lt;P&gt;OLDCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OLDC001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Supplier Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue we have is that the Supplier Name may change, so the name of the supplier may get updated in the new ERP, but not in the old ERP. So, I want to download the transactions from the old system, and if the vendor exists, overwrite the name of the supplier, with the most recent one, from the new ERP system. I've attempted a MAPPING script, which is attached - This successfully updates all of the old transactions, but then drops the new ones! Is there a mistake in the script which I'm missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 07:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123280#M630132</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-22T07:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: MAPPING old records to new records.</title>
      <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123281#M630133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure about the data structure here, it might be due to '' used when applymap cannot find the old account code. &lt;/P&gt;&lt;P&gt;ApplyMap('NavCodeMap', [Old Account Code], '') &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 09:29:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123281#M630133</guid>
      <dc:creator />
      <dc:date>2016-07-22T09:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: MAPPING old records to new records.</title>
      <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123282#M630134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You code looks OK . Can you elaborate on what gets dropped ? as you haven't used any DROP statement and you are simply appending the newcode with the oldcode &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 09:32:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123282#M630134</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2016-07-22T09:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: MAPPING old records to new records.</title>
      <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123283#M630135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, the use of the word drop was unintentional. We moved systems in December 2015, so any transactions before then are correctly updated with the most recent vendor name. Any transactions from the new system have a blank vendor name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 09:41:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123283#M630135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-22T09:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: MAPPING old records to new records.</title>
      <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123284#M630136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the issue is in your ApplyMap function, you are assigning a blank space when a old account is not found in the new one&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;VendorLedgerData:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Old Account Code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('NavCodeMap', [Old Account Code], &lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;''&lt;/SPAN&gt;) AS [Account Code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('NavNameMap', [Old Account Code], &lt;SPAN style="color: #ff0000; font-size: 14pt;"&gt;''&lt;/SPAN&gt;) AS Vendor&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;\\HDG-FILE\Users2\Qlik\MyFile2.qvd (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By Default ApplyMap will put the value of Old Account Code if it doesn't find a match, so for your 1st apply map you might not even need anything. For second one, you will need the old vendor field within MyFile2.qvd. So something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;VendorLedgerData:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;LOAD [Old Account Code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('NavCodeMap', [Old Account Code]) AS [Account Code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('NavNameMap', [Old Account Code], &lt;SPAN style="color: #33cccc;"&gt;[Vendor Field From MyFile2.qvd]&lt;/SPAN&gt;) AS Vendor&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;\\HDG-FILE\Users2\Qlik\MyFile2.qvd (qvd);&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Here &lt;STRONG style="color: #33cccc; font-size: 13.3333px;"&gt;[Vendor Field From MyFile2.qvd]&lt;/STRONG&gt; is a placeholder for your field name and replace to get the old vendor name when new one isn't available.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;HTH&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Best,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 10:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123284#M630136</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-22T10:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: MAPPING old records to new records.</title>
      <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123285#M630137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it because you are not bringing in the vendor name in the 2nd part of the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD No_ AS [Account Code],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Old Account Code],&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Month,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Amount,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Need to add vendor name here&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;\\FILE\users2\Qlik\MyFile3.qvd (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 11:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123285#M630137</guid>
      <dc:creator>danansell42</dc:creator>
      <dc:date>2016-07-22T11:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: MAPPING old records to new records.</title>
      <link>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123286#M630138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this has solved one of the issues, which made the other issue clear.&lt;/P&gt;&lt;P&gt;I was not bringing the name of the vendor through from Myfile as it clashed with Vendor in the map. However, if i changed vendor to "name" and brought through the data as "name" to match, the data now works.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 12:41:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAPPING-old-records-to-new-records/m-p/1123286#M630138</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-22T12:41:39Z</dc:date>
    </item>
  </channel>
</rss>

