<?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: String function in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385127#M702205</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('John Test TT - RRR', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('John Test TT - RRR', ' ', 2)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Edit: If the name can be more than two words (John Lesley Test), you can count spaces from the end, assuming there are three:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(Field, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(Field, ' ', -3)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Sep 2012 16:58:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-06T16:58:44Z</dc:date>
    <item>
      <title>String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385122#M702200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have hopefully a very straightforward question that I just can't resolved. I have a particular field that displays data in the format "John Test TT - RRR" etc. I want it to be simply displayed as "John Test" so require " TT - RRR" to be removed. I've tried a range of string functions but haven't been able to get the correct answer. Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ralph &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 16:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385122#M702200</guid>
      <dc:creator />
      <dc:date>2012-09-06T16:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385123#M702201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Try SubField([your string], ' TT', 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 16:47:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385123#M702201</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2012-09-06T16:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385124#M702202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I should have made clear that "TT" and "RRR" can be different values and the RRR value can change in length (usually 2, 3 or 4 characters). Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 16:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385124#M702202</guid>
      <dc:creator />
      <dc:date>2012-09-06T16:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385125#M702203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ralph,&lt;/P&gt;&lt;P&gt;That means the the question is about the rules.&amp;nbsp; Does it mean you need to remove the part of the string staring from the 2nd space?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 16:54:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385125#M702203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-06T16:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385126#M702204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes anything starting from the 2nd space should be purged from the string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ralph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 16:56:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385126#M702204</guid>
      <dc:creator />
      <dc:date>2012-09-06T16:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385127#M702205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('John Test TT - RRR', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('John Test TT - RRR', ' ', 2)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Edit: If the name can be more than two words (John Lesley Test), you can count spaces from the end, assuming there are three:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(Field, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(Field, ' ', -3)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 16:58:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385127#M702205</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-06T16:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385128#M702206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes that works brilliant. Many thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ralph &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 17:02:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385128#M702206</guid>
      <dc:creator />
      <dc:date>2012-09-06T17:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385129#M702207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry just noticed one further thing with the below, there is a space after the name, e.g. "John Test ", how can I make it simply "John Test" with no space after Test?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ralph&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 17:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385129#M702207</guid>
      <dc:creator />
      <dc:date>2012-09-06T17:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385130#M702208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Either put the whole thing inside trim() function - it removes leading and trainling spaces, or modify the expression a little by adding -1:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;left&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('John Test TT - RRR', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('John Test TT - RRR', ' ', 2)&lt;STRONG&gt;-1&lt;/STRONG&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 17:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385130#M702208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-06T17:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385131#M702209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works great, thanks again. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2012 17:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385131#M702209</guid>
      <dc:creator />
      <dc:date>2012-09-06T17:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: String function in script</title>
      <link>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385132#M702210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in script write &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let Vname=trim(replace('&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;John Test TT - RRR&lt;/SPAN&gt;','TT - RRR',' '));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now select&amp;nbsp; it where ever you want in your sheet by front end with&amp;nbsp; "Vname"&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for asking this question .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;-premhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 11:20:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/String-function-in-script/m-p/385132#M702210</guid>
      <dc:creator>preminqlik</dc:creator>
      <dc:date>2013-03-01T11:20:38Z</dc:date>
    </item>
  </channel>
</rss>

