<?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: Alternative String Functions to Replace in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332872#M411572</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting - very useful if not easy to read. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Aug 2017 08:01:41 GMT</pubDate>
    <dc:creator>shane_spencer</dc:creator>
    <dc:date>2017-08-02T08:01:41Z</dc:date>
    <item>
      <title>Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332864#M411564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All - just wanted your suggestions for best /neatest code. I've got some data and sometimes the contents of one of the fields is preceded by &lt;STRONG&gt;1.&lt;/STRONG&gt; &lt;STRONG&gt;2.&lt;/STRONG&gt; or &lt;STRONG&gt;3. &lt;/STRONG&gt;Obviously I can't use PurgeChar as it's a string of 2 characters plus there's numbers in the data. I opted for using a replace - or more accurately 3 replaces (see below) - but I think there may be a more efficient way (especially if I had more strings to replace than those 3). I did think of an If statement combined with mid but that didn't seem any more efficient that what I'd got. Any better ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRIM(&amp;nbsp;&amp;nbsp; Replace(&amp;nbsp; Replace( Replace(FIELDNAME,'1.','') ,'2.','')&amp;nbsp; ,'3.','')&amp;nbsp;&amp;nbsp; ) As NEWFIELDNAME,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:34:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332864#M411564</guid>
      <dc:creator>shane_spencer</dc:creator>
      <dc:date>2017-08-02T07:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332865#M411565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be using subfield(), considering dot (.) a separator, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubField(Field, '.', 2) as NewField&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:40:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332865#M411565</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-08-02T07:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332866#M411566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That would work in this case because there are no other dots (.) in the data, but it doesn't seem very robust. Thanks though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:48:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332866#M411566</guid>
      <dc:creator>shane_spencer</dc:creator>
      <dc:date>2017-08-02T07:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332867#M411567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Replace(Field, SubField(Field, '.', 1)&amp;amp;'.' , '') as NewField&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332867#M411567</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-08-02T07:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332868#M411568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shane,&lt;/P&gt;&lt;P&gt;You can use MapSubstring() Function&lt;/P&gt;&lt;P&gt;like this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;MapTable:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Mapping&lt;/SPAN&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; * &lt;SPAN style="color: #0000ff;"&gt;Inline&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[&lt;BR /&gt; A,B&lt;BR /&gt; 1.,&lt;BR /&gt; 2.,&lt;BR /&gt; 3.,&lt;BR /&gt; ]&lt;/SPAN&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;STRONG style=": ; color: #0000ff;"&gt;LOAD&lt;/STRONG&gt; *,&lt;SPAN style="color: #0000ff;"&gt;MapSubString&lt;/SPAN&gt;('MapTable',&lt;SPAN style="color: #800000;"&gt;Field&lt;/SPAN&gt;) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;MappedField&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Inline&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;[&lt;BR /&gt; Field&lt;BR /&gt; 1.00A&lt;BR /&gt; 2.00B&lt;BR /&gt; 3.00C&lt;BR /&gt; 400&lt;BR /&gt; 500&lt;BR /&gt; 600]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/172152_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Antonio&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332868#M411568</guid>
      <dc:creator>antoniotiman</dc:creator>
      <dc:date>2017-08-02T07:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332869#M411569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's clever - I haven't used &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MapSubstring() function before.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332869#M411569</guid>
      <dc:creator>shane_spencer</dc:creator>
      <dc:date>2017-08-02T07:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332870#M411570</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;May be as variant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD*,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;If(IsNull(Left(Field, Index(Field, '.')-1))=0, Right(Field, Len(Field)-Index(Field, '.')), Field) as Newfield;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD*Inline&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[Field&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.fjfk&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;22.jjfkfl&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;3.345&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;44.3e4r&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;jfkgl&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;jdjdk&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2354.5hytu&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;876.ryt5&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;Result&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/172161_1.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 07:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332870#M411570</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-08-02T07:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332871#M411571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's very neat - as long as there's no other dots in my data to screw things up. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 08:00:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332871#M411571</guid>
      <dc:creator>shane_spencer</dc:creator>
      <dc:date>2017-08-02T08:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332872#M411572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting - very useful if not easy to read. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 08:01:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332872#M411572</guid>
      <dc:creator>shane_spencer</dc:creator>
      <dc:date>2017-08-02T08:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332873#M411573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to cut short from the first dot, you could try:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Mid(Field, Index(Field,'.'))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 08:06:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332873#M411573</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-08-02T08:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative String Functions to Replace</title>
      <link>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332874#M411574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Function Index() determine the location of the first point.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;If(IsNull(Left(Field,&lt;SPAN style="color: #ff0000;"&gt; Index(Field, '.')&lt;/SPAN&gt;-1))=0, Right(Field, Len(Field)-Index(Field, '.')), Field) as Newfield&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;We check if there is a number on the left,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #ff0000;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;If(&lt;SPAN style="color: #ff0000;"&gt;IsNull(Left(Field, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt;Index(Field, '.')&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #ff0000;"&gt;-1))=0&lt;/SPAN&gt;, Right(Field, Len(Field)-Index(Field, '.')), Field) as Newfield&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333px;"&gt;&lt;EM&gt;then discard it,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;If(&lt;/SPAN&gt;IsNull(Left(Field, Index(Field, '.')-1))=0, &lt;SPAN style="color: #ff0000;"&gt;Right(Field, Len(Field)-Index(Field, '.'))&lt;/SPAN&gt;, Field) as Newfield&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;otherwise we take the whole field.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;If(&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;IsNull(Left(Field, Index(Field, '.')-1))=0, Right(Field, Len(Field)-Index(Field, '.')),&lt;SPAN style="color: #ff0000;"&gt; Field&lt;/SPAN&gt;) as Newfield&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG style="color: #000000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG style="color: #000000;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;I'm glad if I help.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 08:21:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Alternative-String-Functions-to-Replace/m-p/1332874#M411574</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-08-02T08:21:47Z</dc:date>
    </item>
  </channel>
</rss>

