<?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: Separate a String in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409910#M1166728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be best to create a new field in the script, using any of the suggested solutions (I would prefer mwoolf's one) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let vAlphaChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Option_Code,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;mid(Option_Code, findoneof(Option_Code,'$(vAlphaChars)')) as Option_Box,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from YourTable;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Oct 2012 13:50:39 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-10-16T13:50:39Z</dc:date>
    <item>
      <title>Separate a String</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409905#M1166723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Hello All!,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I have a field called Option_Code whose value is a string that I'd like to separate out. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Option_Code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;0500_0599_VALUE_PKG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;9078_FENDER_LIGHTS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;9188_ENGINE_BLK_HTR_110VG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;0001_0249_DESTN_COUNTRY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;All I want is everything from the left of the text to be deleted so that it looks like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;VALUE_PKG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;FENDER_LIGHTS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;ENGINE_BLK_HTR_110VG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;DESTN_COUNTRY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming i'll need to use a trim function, but i'm not sure how the coding should be..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I tried using &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;purgechar&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;[OPTION BOX]&lt;/SPAN&gt;,'_') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;which helps get rid of the underscores '_'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but i'd like to only have the TEXT showing ( not the beginning #'s)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any help!&lt;/P&gt;&lt;P&gt;-Liz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 18:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409905#M1166723</guid>
      <dc:creator />
      <dc:date>2012-10-12T18:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Separate a String</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409906#M1166724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;if(&lt;SPAN style="color: #0000ff;"&gt;Left&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Right&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;PurgeChar&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;,'0123456789'),&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;PurgeChar&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;,'0123456789'))-1),1)='_',&lt;SPAN style="color: #0000ff;"&gt;Right&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;PurgeChar&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;,'0123456789'),&lt;BR /&gt; &lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;PurgeChar&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;,'0123456789'))-2),&lt;SPAN style="color: #0000ff;"&gt;Right&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;PurgeChar&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;,'0123456789'),&lt;SPAN style="color: #0000ff;"&gt;Len&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;PurgeChar&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;Value&lt;/SPAN&gt;,'0123456789'))-1)) &lt;SPAN style="color: #0000ff;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Final &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 18:41:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409906#M1166724</guid>
      <dc:creator />
      <dc:date>2012-10-12T18:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Separate a String</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409907#M1166725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Liz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are probably several ways to do this, I think you can do it like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TMP:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;subfield(Option_Code,'_') as SubCode, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;recno() as RecNo, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;rowno() as SortOrder&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;INLINE [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Option_Code&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;0500_0599_VALUE_PKG&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;9078_FENDER_LIGHTS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;9188_ENGINE_BLK_HTR_110VG&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;0001_0249_DESTN_COUNTRY&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;RESULT:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD concat(SubCode,'_',SortOrder) as Option_Code resident TMP where isText(SubCode) group by RecNo;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table TMP;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 18:41:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409907#M1166725</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-12T18:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Separate a String</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409908#M1166726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;let vAlphaChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mid(Option_Code, findoneof(Option_Code,'$(vAlphaChars)')) as YourfieldName,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2012 18:55:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409908#M1166726</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2012-10-12T18:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Separate a String</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409909#M1166727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for all your help!&lt;/P&gt;&lt;P&gt;I was able to have a separate column within the Option Code listbox, however i'd like to make a separate listbox with just the Option Box name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Oct 2012 15:08:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409909#M1166727</guid>
      <dc:creator />
      <dc:date>2012-10-15T15:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: Separate a String</title>
      <link>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409910#M1166728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be best to create a new field in the script, using any of the suggested solutions (I would prefer mwoolf's one) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let vAlphaChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Option_Code,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;mid(Option_Code, findoneof(Option_Code,'$(vAlphaChars)')) as Option_Box,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;from YourTable;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2012 13:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Separate-a-String/m-p/409910#M1166728</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-10-16T13:50:39Z</dc:date>
    </item>
  </channel>
</rss>

