<?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 Substring In Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Substring-In-Macro/m-p/457373#M170733</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 am trying to implement a macro that does a field selection, based on a list of items in a variable.&lt;/P&gt;&lt;P&gt;Consequently the variable in question will be a string where the items are seperated by ','.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried achieving this through a substring creation.&lt;/P&gt;&lt;P&gt;THat way I get the count of items, as well as can extract the items individually.&lt;/P&gt;&lt;P&gt;Qlikview does not accept the standard macro commands 'Substring' or 'SubStr' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this substring search be done in a Qlikview macro ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Dec 2012 15:05:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-12-20T15:05:39Z</dc:date>
    <item>
      <title>Substring In Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-In-Macro/m-p/457373#M170733</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 am trying to implement a macro that does a field selection, based on a list of items in a variable.&lt;/P&gt;&lt;P&gt;Consequently the variable in question will be a string where the items are seperated by ','.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried achieving this through a substring creation.&lt;/P&gt;&lt;P&gt;THat way I get the count of items, as well as can extract the items individually.&lt;/P&gt;&lt;P&gt;Qlikview does not accept the standard macro commands 'Substring' or 'SubStr' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this substring search be done in a Qlikview macro ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 15:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-In-Macro/m-p/457373#M170733</guid>
      <dc:creator />
      <dc:date>2012-12-20T15:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Substring In Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Substring-In-Macro/m-p/457374#M170734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the instr function. Instr("Hello, World!",",") returns 6 which is the position of the comma in the string. Something else you can use is the activedocument.Evaluate function which allows you to evaluate qlikview expressions.&amp;nbsp; activedocument.Evaluate("subfield('Hello, World!',',',1)") returns "Hello".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2012 15:20:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Substring-In-Macro/m-p/457374#M170734</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-12-20T15:20:48Z</dc:date>
    </item>
  </channel>
</rss>

