<?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 Extract section of a string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Extract-section-of-a-string/m-p/1642113#M594001</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Within a field in the script, I'm trying extract a small section that includes a client ID (Underlined in the below example).&amp;nbsp; As you can see, the number of leading zeros can differ as client ID's range from 4 to 9 digits, and never start with 0.&amp;nbsp; After the client ID ends in the string, '-' appears.&amp;nbsp; '-' at times appears for a second time in some of the records that have an account name that includes '-'.&amp;nbsp; I've tried a number of combinations of left/index combinations but cannot quite get there, help please!&amp;nbsp; I was close when indexing as such:&lt;/P&gt;&lt;P&gt;left(REPLACE(LTRIM(REPLACE(Description,'0',' ')),' ','0'),Index(Description,'-',-1)-Index(Description,'-',+1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;0000&lt;U&gt;544056&lt;/U&gt;-01 Gross Wages Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-02 FICA ER Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-3&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-03 Medicare ER Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-04 FUTA ER Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-5&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-33 401k Payable - S&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-33 Medcom Flex Paya&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-30 SUTA Payable&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-32 W/C - Zurich Pol&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33 401k Payable - S&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33 Garnishments Pay&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33 Other Health Ins&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-34&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-34 401k Payable - S&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-34 Florida Blue Hea&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-51 Accounts Receiva&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-54 Gross Wages Reve&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-55 FICA Revenue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 02:03:36 GMT</pubDate>
    <dc:creator>pbriggs11</dc:creator>
    <dc:date>2024-11-16T02:03:36Z</dc:date>
    <item>
      <title>Extract section of a string</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-section-of-a-string/m-p/1642113#M594001</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Within a field in the script, I'm trying extract a small section that includes a client ID (Underlined in the below example).&amp;nbsp; As you can see, the number of leading zeros can differ as client ID's range from 4 to 9 digits, and never start with 0.&amp;nbsp; After the client ID ends in the string, '-' appears.&amp;nbsp; '-' at times appears for a second time in some of the records that have an account name that includes '-'.&amp;nbsp; I've tried a number of combinations of left/index combinations but cannot quite get there, help please!&amp;nbsp; I was close when indexing as such:&lt;/P&gt;&lt;P&gt;left(REPLACE(LTRIM(REPLACE(Description,'0',' ')),' ','0'),Index(Description,'-',-1)-Index(Description,'-',+1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;0000&lt;U&gt;544056&lt;/U&gt;-01 Gross Wages Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-02 FICA ER Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-3&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-03 Medicare ER Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-04 FUTA ER Cost&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-5&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-33 401k Payable - S&lt;BR /&gt;0000&lt;U&gt;544056&lt;/U&gt;-33 Medcom Flex Paya&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-30 SUTA Payable&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-32 W/C - Zurich Pol&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33 401k Payable - S&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33 Garnishments Pay&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-33 Other Health Ins&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-34&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-34 401k Payable - S&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-34 Florida Blue Hea&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-51 Accounts Receiva&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-54 Gross Wages Reve&lt;BR /&gt;000000&lt;U&gt;1655&lt;/U&gt;-55 FICA Revenue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-section-of-a-string/m-p/1642113#M594001</guid>
      <dc:creator>pbriggs11</dc:creator>
      <dc:date>2024-11-16T02:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract section of a string</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-section-of-a-string/m-p/1642114#M594003</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Num(Num#(SubField(FieldName, '-', 1)))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 01 Nov 2019 14:43:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-section-of-a-string/m-p/1642114#M594003</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-11-01T14:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extract section of a string</title>
      <link>https://community.qlik.com/t5/QlikView/Extract-section-of-a-string/m-p/1642117#M594005</link>
      <description>&lt;P&gt;Thanks for the accurate and prompt reply Sunny, much appreciated!!!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2019 14:48:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Extract-section-of-a-string/m-p/1642117#M594005</guid>
      <dc:creator>pbriggs11</dc:creator>
      <dc:date>2019-11-01T14:48:36Z</dc:date>
    </item>
  </channel>
</rss>

