<?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: Data load editor, handle null values in mapping in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868259#M71701</link>
    <description>&lt;P&gt;If there are no other possible [active] values than 1 and 0, then you can just add&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'unknown' as third (default) parameter to the ApplyMap() function:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;APPLYMAP( 'activeMapping', [active], 'unknown')&lt;/LI-CODE&gt;
&lt;P&gt;otherwise everything besides 1 and 0 would be mapped to&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'unknown' as well, i.e. not only the NULL values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But based on the field name active and values 1 and 0 most likely there are no other values anyways?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
    <pubDate>Wed, 08 Dec 2021 17:27:09 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2021-12-08T17:27:09Z</dc:date>
    <item>
      <title>Data load editor, handle null values in mapping</title>
      <link>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868207#M71696</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;In my data load editor script I use a mapping like this:&lt;/P&gt;
&lt;P&gt;[activeMapping]:&lt;BR /&gt;MAPPING LOAD * INLINE&lt;BR /&gt;[&lt;BR /&gt;activeMapping-FROM,activeMapping-TO&lt;BR /&gt;1,Yes&lt;BR /&gt;0,No&lt;BR /&gt;];&lt;BR /&gt;[table1]:&lt;BR /&gt;LOAD&lt;BR /&gt;APPLYMAP( 'activeMapping', [active]) AS [active];&lt;BR /&gt;.&lt;BR /&gt;.&lt;/P&gt;
&lt;P&gt;This works as expected but may data also contains NULL values or empty strings for the active field. How can I map these to (for instance) 'unknown' ?&lt;/P&gt;
&lt;P&gt;TIA, Mark.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 16:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868207#M71696</guid>
      <dc:creator>MarkH1</dc:creator>
      <dc:date>2021-12-08T16:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data load editor, handle null values in mapping</title>
      <link>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868259#M71701</link>
      <description>&lt;P&gt;If there are no other possible [active] values than 1 and 0, then you can just add&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'unknown' as third (default) parameter to the ApplyMap() function:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;APPLYMAP( 'activeMapping', [active], 'unknown')&lt;/LI-CODE&gt;
&lt;P&gt;otherwise everything besides 1 and 0 would be mapped to&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'unknown' as well, i.e. not only the NULL values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But based on the field name active and values 1 and 0 most likely there are no other values anyways?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 17:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868259#M71701</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2021-12-08T17:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Data load editor, handle null values in mapping</title>
      <link>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868615#M71725</link>
      <description>&lt;P&gt;Thanks Marco, that worked. In this case active can only be 0, 1 or undefined (null). I found out there is another option: in the load section do something like If(IsNull([active]), 'unknown', APPLYMAP( 'activeMapping', [active])) AS [active];&lt;BR /&gt;But your solution is cleaner.&lt;/P&gt;
&lt;P&gt;Mark.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 12:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868615#M71725</guid>
      <dc:creator>MarkH1</dc:creator>
      <dc:date>2021-12-09T12:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Data load editor, handle null values in mapping</title>
      <link>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868831#M71743</link>
      <description>&lt;P&gt;Glad it worked.&lt;/P&gt;
&lt;P&gt;Please close your thread by accepting a solution if your question is answered.&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 21:19:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-load-editor-handle-null-values-in-mapping/m-p/1868831#M71743</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2021-12-09T21:19:53Z</dc:date>
    </item>
  </channel>
</rss>

