<?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: ApplyMap cannot find a field in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093391#M89610</link>
    <description>&lt;P&gt;use preceding load and try apply map:-&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Load *,
 ApplyMap('MRPCNMAP',MRPLONG,'Not Known') as MRPCNLONG1;
LOAD
    Plnt,
    Material,
    Exc.,
    Resch.date,
    "N",
    "E",
    "n",
    If(Len("N")&amp;lt;1,'Planned Order',If(Len("n")&amp;lt;1,'Production Order','Blank')) as PRODPLAN,
    MRPCn,
    ApplyMap('MRPCNMAP',MRPLONG,'Not Known') as MRPCNLONG,
    Plnt&amp;amp;MRPCn AS MRPLONG,
    PGr,
   ApplyMap('PURCHAINGGROUPMAP',PGr,'Not Known') as PGrLong,
    SPT,
    ProcType,
    "MRP date",
    Typ
FROM [lib://DataFiles/Exception Message Raw Data.XLSX]
(ooxml, embedded labels, table is Sheet1);&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 13 Jul 2023 08:28:10 GMT</pubDate>
    <dc:creator>udit_k</dc:creator>
    <dc:date>2023-07-13T08:28:10Z</dc:date>
    <item>
      <title>ApplyMap cannot find a field</title>
      <link>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093377#M89607</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So in the raw data I have two fields, "Plnt" and "MRPcn"&lt;/P&gt;
&lt;P&gt;In the mapping load I needed to effectively concat these together .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MRPCNMAP:
Mapping LOAD * Inline
[
MRPLONG,MRP controller name
0600000, VENDOR STOCKING
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the 0600 is the Plnt field and the 000 is the MRPcn field&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now when I apply the map, it cannot find the field MRP long&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD
    Plnt,
    Material,
    Exc.,
    Resch.date,
    "N",
    "E",
    "n",
    If(Len("N")&amp;lt;1,'Planned Order',If(Len("n")&amp;lt;1,'Production Order','Blank')) as PRODPLAN,
    MRPCn,
    ApplyMap('MRPCNMAP',MRPLONG,'Not Known') as MRPCNLONG,
    Plnt&amp;amp;MRPCn AS MRPLONG,
    PGr,
   ApplyMap('PURCHAINGGROUPMAP',PGr,'Not Known') as PGrLong,
    SPT,
    ProcType,
    "MRP date",
    Typ
FROM [lib://DataFiles/Exception Message Raw Data.XLSX]
(ooxml, embedded labels, table is Sheet1);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Idea how I can get this to work.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:15:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093377#M89607</guid>
      <dc:creator>MikeGaunt1</dc:creator>
      <dc:date>2023-07-13T08:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap cannot find a field</title>
      <link>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093388#M89609</link>
      <description>&lt;P&gt;Hey Mike,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe the issue is that the ''MRPLONG'' field is not created until after the ''ApplyMap'' function is called. You should perhaps create the ''MRPLONG'' field before calling the ''ApplyMap'' function. Please try this and see if it helps&lt;BR /&gt;&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Plnt,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Material,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Exc.,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Resch.date,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"N",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"E",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"n",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;If(Len("N")&amp;lt;1,'Planned Order',If(Len("n")&amp;lt;1,'Production Order','Blank')) as PRODPLAN,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;MRPCn,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Plnt&amp;amp;MRPCn AS MRPLONG,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;ApplyMap('MRPCNMAP',MRPLONG,'Not Known') as MRPCNLONG,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;PGr,&lt;BR /&gt;&amp;nbsp; ApplyMap('PURCHAINGGROUPMAP',PGr,'Not Known') as PGrLong,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;SPT,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;ProcType,&lt;BR /&gt;&amp;nbsp; &amp;nbsp;"MRP date",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;Typ&lt;BR /&gt;FROM [lib://DataFiles/Exception Message Raw Data.XLSX]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:45:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093388#M89609</guid>
      <dc:creator>Chirantha</dc:creator>
      <dc:date>2023-07-13T08:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap cannot find a field</title>
      <link>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093391#M89610</link>
      <description>&lt;P&gt;use preceding load and try apply map:-&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Load *,
 ApplyMap('MRPCNMAP',MRPLONG,'Not Known') as MRPCNLONG1;
LOAD
    Plnt,
    Material,
    Exc.,
    Resch.date,
    "N",
    "E",
    "n",
    If(Len("N")&amp;lt;1,'Planned Order',If(Len("n")&amp;lt;1,'Production Order','Blank')) as PRODPLAN,
    MRPCn,
    ApplyMap('MRPCNMAP',MRPLONG,'Not Known') as MRPCNLONG,
    Plnt&amp;amp;MRPCn AS MRPLONG,
    PGr,
   ApplyMap('PURCHAINGGROUPMAP',PGr,'Not Known') as PGrLong,
    SPT,
    ProcType,
    "MRP date",
    Typ
FROM [lib://DataFiles/Exception Message Raw Data.XLSX]
(ooxml, embedded labels, table is Sheet1);&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:28:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093391#M89610</guid>
      <dc:creator>udit_k</dc:creator>
      <dc:date>2023-07-13T08:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: ApplyMap cannot find a field</title>
      <link>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093415#M89619</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/186789"&gt;@udit_k&lt;/a&gt; 's suggestion will work, but I would personally prefer simply referring to the fields directly in the ApplyMap() function to adding a preceding load for this specific purpose:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ApplyMap('MRPCNMAP',Plnt&amp;amp;MRPCn,'Not Known') as MRPCNLONG&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that you can't refer to a field that was created within the load script inside the same load script, so you need to either use a preceding load, or refer to the underlying fields/formulas.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:51:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/ApplyMap-cannot-find-a-field/m-p/2093415#M89619</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-07-13T08:51:57Z</dc:date>
    </item>
  </channel>
</rss>

