<?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: Weird MapSubString Behaviour. Wtf? in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Weird-MapSubString-Behaviour-Wtf/m-p/2160207#M13204</link>
    <description>&lt;P&gt;Oh, it makes sense&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 18:40:26 GMT</pubDate>
    <dc:creator>pedrohenriqueperna</dc:creator>
    <dc:date>2024-01-10T18:40:26Z</dc:date>
    <item>
      <title>Weird MapSubString Behaviour. Wtf?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Weird-MapSubString-Behaviour-Wtf/m-p/2160199#M13202</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a mapping table that holds plenty values, but replacing numbers to the number name is not working properly for some reason I don't know why.&lt;/P&gt;
&lt;P&gt;It seems to happen only in the following case (whatever number it is):&lt;/P&gt;
&lt;P&gt;ReplaceNumber:&lt;/P&gt;
&lt;P&gt;Mapping LOAD * Inline [&lt;/P&gt;
&lt;P&gt;" 1 "," one "&lt;/P&gt;
&lt;P&gt;" 2 "," two "&lt;/P&gt;
&lt;P&gt;" 3 "," three "&lt;/P&gt;
&lt;P&gt;" 4 "," four "&lt;/P&gt;
&lt;P&gt;" 5 "," five "&lt;/P&gt;
&lt;P&gt;" 6 "," six "&lt;/P&gt;
&lt;P&gt;" 06 "," six "&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consider I have 2 rows in a table, one string the value is "NW 06" and the other is "NW 6". If I MapSubString, "NW 6" becomes "NW SIX", but "NW 06" remains the same. If I change the order within the table (06 first), the result is the opposite.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why???&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Weird-MapSubString-Behaviour-Wtf/m-p/2160199#M13202</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-10T18:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Weird MapSubString Behaviour. Wtf?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Weird-MapSubString-Behaviour-Wtf/m-p/2160206#M13203</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/205436"&gt;@pedrohenriqueperna&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It is because the mapping load is converting `06` to the integer `6`. To preserve it as text, wrap it in the `Text()` function. The below works.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ReplaceNumber:
Mapping LOAD 
  	Text(Key) AS Key,
  	Value
Inline [
  Key	,Value
  1		,one
  2		,two
  3		,three
  4		,four
  5		,five
  6		,six
  06	,six
];

Data:
LOAD
	*,
    MapSubString('ReplaceNumber',Data) AS DataMapped
;
LOAD * INLINE [
	Data
    NW 6
    NW 06
];&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Weird-MapSubString-Behaviour-Wtf/m-p/2160206#M13203</guid>
      <dc:creator>Daniel_Pilla</dc:creator>
      <dc:date>2024-01-10T18:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Weird MapSubString Behaviour. Wtf?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Weird-MapSubString-Behaviour-Wtf/m-p/2160207#M13204</link>
      <description>&lt;P&gt;Oh, it makes sense&lt;/P&gt;
&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Weird-MapSubString-Behaviour-Wtf/m-p/2160207#M13204</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2024-01-10T18:40:26Z</dc:date>
    </item>
  </channel>
</rss>

