<?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: Subfield loop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172158#M380883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome. Thanks for sharing how you managed to resolved it. I am sure this will be helpful for others in the future&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 May 2016 15:18:00 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-30T15:18:00Z</dc:date>
    <item>
      <title>Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172150#M380875</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've an unusual request but I'm almost there and just need some help getting over the final hurdle. I have a file containing a few thousand records that contains strings I need to split in two. The thing is, the strings have varying lengths and no clear distinctive character I can use to separate them, apart from an upper case character appearing after the first character. As the strings were originally concatenations of two strings with nothing in between, I've managed to split them using a series of loops searching for 2 capital letters and returning the number of the subfield of the first word in the string that contains 2 upper case letters and 1 or more lower case records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Original&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Subfield_Split&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Route A - DavidReturn journey&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Route A - David&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Return journey&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;James B - Driver - Part Time.No more than 4 hours round trip&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;James B - Driver - Part Time.&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;No more than 4 hours round trip&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand it's strange but I need to display as close to the &lt;STRONG&gt;Header&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;Description&lt;/STRONG&gt; fields as I can. I've already worked out the subfield I need to split the string on, now I need to find a way to display it.Do I create another series of loops that concat the correct number of subfields together or is there a better way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the first field would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subfield(Original, ' ', 1) &amp;amp; ' ' &amp;amp; &lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 2)&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 3)&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 4) AS Header,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 4)&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;Subfield(Original, ' ', 5)&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 6) AS Description&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the second would be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 1) &amp;amp; ' ' &amp;amp; &lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 2)&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 3)&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 4) &lt;SPAN style="font-size: 13.3333px;"&gt;&amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 5)&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 6)&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 7) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;AS Header,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 7)&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 9)&lt;SPAN style="font-size: 13.3333px;"&gt; &amp;amp; ' ' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield(Original, ' ', 10)........etc.&lt;/SPAN&gt;&lt;/SPAN&gt; AS Description&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 13:17:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172150#M380875</guid>
      <dc:creator>ciaran_mcgowan</dc:creator>
      <dc:date>2016-05-30T13:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172151#M380876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is Subfield_Split a column coming available in your database or is that just created for demonstration purposes here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 13:56:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172151#M380876</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T13:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172152#M380877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are these the only two cases? If not, there is probably no way to fix this (because of the large number of possibly different cases).&lt;/P&gt;&lt;P&gt;Moreover, the example code in your post doesn't split the concatenated words into a header and a description part. In the first example, Header = "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Route A - David&lt;EM&gt;Return&lt;/EM&gt;" and Description = "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;David&lt;/EM&gt;Return journey". The same with the second example. Header = "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;James B - Driver - Part Time.&lt;EM&gt;No&lt;/EM&gt;&lt;/SPAN&gt;" and Description = "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;EM&gt;Time.&lt;/EM&gt;No more than 4 hours round trip&lt;/SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there no way you can get hold of part of the string (like the left or left part from some other field in the original data source)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tip: better start by first splitting the concatenated strings on the last hyphen. The text to be cut into pieces now becomes smaller and - maybe - easier to handle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 14:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172152#M380877</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-05-30T14:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172153#M380878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created it in the script using a series of (complex) loops to work out where the concatenation occurs so it's there and correct for each row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 14:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172153#M380878</guid>
      <dc:creator>ciaran_mcgowan</dc:creator>
      <dc:date>2016-05-30T14:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172154#M380879</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;These are not the only two cases, there are loads more, all different but share the same type of join. I'm aware of the results you described but I'm working out a way to counter act that behavior. I just had a eureka moment so watch this space (hopefully).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 14:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172154#M380879</guid>
      <dc:creator>ciaran_mcgowan</dc:creator>
      <dc:date>2016-05-30T14:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172155#M380880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share what you have done so far. May be we can leverage what you have and expand on your logic&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 15:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172155#M380880</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T15:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172156#M380881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right. Got it sorted in the end. It's not the most elegant but it works and it only needs to run once a month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of return the number of the SUBFIELD where the original JOIN happens, I returned the SUBFIELD itself (&lt;EM&gt;e.g. instead of 4, return &lt;STRONG&gt;DavidReturn&lt;/STRONG&gt; AS WORD_JOIN&lt;/EM&gt;) and then use that to display the first part of the Hearer string and the last part of the Description string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;Example&lt;/SPAN&gt;: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Subfield(Original, WORD_JOIN, 1) AS Header&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Subfield(Original, WORD_JOIN, 2) AS Description&lt;/SPAN&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;Header&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Route A - '&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; journey'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I use SUBFIELD again to search for the second capital letter in the WORD_JOIN string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Left(WORD_JOIN, 1) &amp;amp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(Subfield(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Right(WORD_JOIN, Len(WORD_JOIN)-1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;, 'A', 1), 'B', 1), 'C', 1), 'D', 1), 'E', 1), 'F', 1), 'G', 1), 'H', 1), 'I', 1), 'J', 1), 'K', 1), 'L', 1), 'M', 1), 'N', 1), 'O', 1), 'P', 1), 'Q', 1), 'R', 1), 'S', 1), 'T', 1), 'U', 1), 'V', 1), 'W', 1), 'X', 1), 'Y', 1), 'Z', 1) AS Header_Missing&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I use SUBFIELD again of RIGHT with this to get the rest of the string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;SUBFIELD(WORD_JOIN, Header_Missing, 2) AS Description Missing&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Right(WORD_JOIN, LEN(WORD_JOIN)-LEN(Header_Missing)) AS Description&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add these two to the end/start of the Header/Description and I have the answer!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 15:13:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172156#M380881</guid>
      <dc:creator>ciaran_mcgowan</dc:creator>
      <dc:date>2016-05-30T15:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172157#M380882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny but I just figured it out. Typing out the scenario in my original question got me thinking and all sorted now!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 15:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172157#M380882</guid>
      <dc:creator>ciaran_mcgowan</dc:creator>
      <dc:date>2016-05-30T15:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172158#M380883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome. Thanks for sharing how you managed to resolved it. I am sure this will be helpful for others in the future&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 15:18:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172158#M380883</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-30T15:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172159#M380884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Glfrtbl&lt;/EM&gt;... Sorry. Well, if it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can use a more elegant technique for the middle part, like a call to function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...FindOneOf(WORD_JOIN, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 2)...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to obtain the index of the second capital letter. Based on that index, you can split off the front using &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...Left(WORD_JOIN, FindOneOf( ... )-1)...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the back using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...Mid(WORD_JOIN, FindOneOf( ... ))... &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 15:27:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172159#M380884</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-05-30T15:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Subfield loop</title>
      <link>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172160#M380885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow! That is way more elegant. I've never used the &lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;FindOneOf&lt;/SPAN&gt; function before so thanks for introducing me to it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 15:45:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subfield-loop/m-p/1172160#M380885</guid>
      <dc:creator>ciaran_mcgowan</dc:creator>
      <dc:date>2016-05-30T15:45:01Z</dc:date>
    </item>
  </channel>
</rss>

