<?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: extract a text from a string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088943#M937312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad one of us was able to help you out &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2016 18:16:24 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-02-10T18:16:24Z</dc:date>
    <item>
      <title>extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088938#M937307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get the position inside a string from an specific text. For example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field Tracking has the following content &lt;/P&gt;&lt;P&gt;0x|cam:0000|adg:0000|kwd:000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Idea how can I get the "adg:" position inside the string so I can later extract the number and save it as a niw field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 14:29:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088938#M937307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-10T14:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088939#M937308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Index('0x|cam:0000|adg:0000|kwd:000', 'adg:')&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;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/114184_Capture.PNG" style="max-width: 620px; height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 15:02:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088939#M937308</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-10T15:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088940#M937309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Sunny T mentioned this is a good approach to the position of "adg:"&lt;/P&gt;&lt;P&gt;If you want the number behind "adg:" try:&lt;/P&gt;&lt;P&gt;=textbetween('0x|cam:0000|adg:0000|kwd:000','adg:','|')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 15:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088940#M937309</guid>
      <dc:creator>richard</dc:creator>
      <dc:date>2016-02-10T15:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088941#M937310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possibility would be using 'Subfield', in the case that your field is built always the same way as you describe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subfield(Tracking, '|', 3) as Y will result in adg:0000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To select the number, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;right(subfield(Tracking,'|', 3), 4) should give you the 0000 (will work if there are always only 4 numbers)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 15:36:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088941#M937310</guid>
      <dc:creator>puttemans</dc:creator>
      <dc:date>2016-02-10T15:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088942#M937311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you all for your answers. All of them are useful, but this solution was the one who fit best my needs. &lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 17:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088942#M937311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-10T17:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088943#M937312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad one of us was able to help you out &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 18:16:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088943#M937312</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-02-10T18:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088944#M937313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@Richard&lt;/P&gt;&lt;P&gt;One more question. The textbetween worked perfectly, but didnt work for last component I wanted to extract. Probably because has no "|" at the end. This only happens in some raws. I mean, some of the raws has no "|" at the end, and others do have as they have more text before it,&lt;/P&gt;&lt;P&gt;In the following example Im tryng to extract the &lt;STRONG&gt;kwd&lt;/STRONG&gt; info.&lt;/P&gt;&lt;P&gt;Example1. &lt;STRONG&gt;Works&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: 12px;"&gt;0x|cam:0000|adg:0000|kwd:000|cid:000....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Example2 &lt;STRONG&gt;Didnt Work&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: 12px;"&gt;0x|cam:0000|adg:0000|kwd:000&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 14:38:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088944#M937313</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-02-22T14:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088945#M937314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Subfield(Tracking, '|',4) will work in both occasions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 15:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088945#M937314</guid>
      <dc:creator>puttemans</dc:creator>
      <dc:date>2016-02-22T15:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: extract a text from a string</title>
      <link>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088946#M937315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lucas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the code for the components can be max 4 digits you can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=mid('0x|cam:0000|adg:0000|kwd:000',index('0x|cam:0000|adg:0000|kwd:000','kwd:'),'8')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you see it's a combination of mid and index. The index function finds the starting text position of 'kwd:'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 15:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extract-a-text-from-a-string/m-p/1088946#M937315</guid>
      <dc:creator>richard</dc:creator>
      <dc:date>2016-02-22T15:06:33Z</dc:date>
    </item>
  </channel>
</rss>

