<?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: extracting info from a row in a csv. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/extracting-info-from-a-row-in-a-csv/m-p/461168#M694556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try: if(index(MyField, 'on srv'), mid(MyField, index(MyField, 'on srv')+3,9),'other') as ServerName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: index returns the start position of the first occurence of a search string in a string. If MyField contains 'on srv' then index(MyField, 'on srv') returns a number larger than 0. In that case we know that there's a server number in the string. If there isn't we specify 'other' as result of the if function. To get the server number the mid function is used. It needs a starting position and a length to determine the substring that's extracted from MyField. The starting position in again calculated with the index function, but we add 3 so we start at &lt;EM&gt;srv&lt;/EM&gt; instead of &lt;EM&gt;on&lt;/EM&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 May 2013 10:02:46 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-05-15T10:02:46Z</dc:date>
    <item>
      <title>extracting info from a row in a csv.</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-info-from-a-row-in-a-csv/m-p/461167#M694555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following problem, i have a table with a column that looks like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. BMC Patrol Agent 3.9.00 on &lt;SPAN style="color: #3366ff;"&gt;srv001601&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. Red Hat KVM Server 83 running on &lt;SPAN style="color: #3366ff;"&gt;srv001352&lt;/SPAN&gt;.mud.internal.co.za&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. Microsoft Hyper-V Server 2008 R2 SP1 identified as SRV001543 on &lt;SPAN style="color: #3366ff;"&gt;srv001502&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. OdLetters-1.0.17:doc-was7-32-02&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only information I would like to extract from this is the srv_name, eg:&lt;/P&gt;&lt;P&gt;srv001601&lt;/P&gt;&lt;P&gt;srv001352&lt;/P&gt;&lt;P&gt;srv001502&lt;/P&gt;&lt;P&gt;the rest would be 'other'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would be loaded as a list box with the srv_name and extra field 'other', where 'other' is the rows without a srv_name in them (e.g: row 4)&lt;/P&gt;&lt;P&gt;As you can see the srv_name is placed in diferrent instances in the data and you can have more than 1 srv in 1 row of data thus i cannot select text beggining with srv (eg: row3).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have noticed is that the srv_name I want is always after the word 'on', if thats any help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 09:54:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-info-from-a-row-in-a-csv/m-p/461167#M694555</guid>
      <dc:creator />
      <dc:date>2013-05-15T09:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: extracting info from a row in a csv.</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-info-from-a-row-in-a-csv/m-p/461168#M694556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try: if(index(MyField, 'on srv'), mid(MyField, index(MyField, 'on srv')+3,9),'other') as ServerName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: index returns the start position of the first occurence of a search string in a string. If MyField contains 'on srv' then index(MyField, 'on srv') returns a number larger than 0. In that case we know that there's a server number in the string. If there isn't we specify 'other' as result of the if function. To get the server number the mid function is used. It needs a starting position and a length to determine the substring that's extracted from MyField. The starting position in again calculated with the index function, but we add 3 so we start at &lt;EM&gt;srv&lt;/EM&gt; instead of &lt;EM&gt;on&lt;/EM&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 10:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-info-from-a-row-in-a-csv/m-p/461168#M694556</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-15T10:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: extracting info from a row in a csv.</title>
      <link>https://community.qlik.com/t5/QlikView/extracting-info-from-a-row-in-a-csv/m-p/461169#M694557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gysbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wow, thank you so much! That absolutely resolved my problem.&lt;/P&gt;&lt;P&gt;If its not any trouble, could you please explain the logic&amp;nbsp; behind this as i may run into something similar i n the future.&lt;/P&gt;&lt;P&gt;I'm fairly new to qlikview developing.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 May 2013 10:12:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/extracting-info-from-a-row-in-a-csv/m-p/461169#M694557</guid>
      <dc:creator />
      <dc:date>2013-05-15T10:12:17Z</dc:date>
    </item>
  </channel>
</rss>

