<?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: How to match text to field content in script? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642733#M235497</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =match('dx', $(=chr(39) &amp;amp; Replace(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.333333969116211px;"&gt;table_field1&lt;/SPAN&gt;, ';', chr(39) &amp;amp; ','&amp;nbsp; &amp;amp; chr(39)) &amp;amp; chr(39)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(as long as there is only one possible value of table_field1 (at the calculation point))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jun 2014 14:53:04 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2014-06-06T14:53:04Z</dc:date>
    <item>
      <title>How to match text to field content in script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642732#M235496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. match('dx',table_field1) where table_field1 contains string 'da;dx;dz'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result should be 2 as dx is second element in string compared to 'dx'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I have to transform table_field1 so that I am getting correct result 2?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried something like .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;match('dx',chr(39) &amp;amp; replace(table_field1,';',chr(39) &amp;amp; ',' &amp;amp; chr(39))&amp;nbsp; &amp;amp; chr(39))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx - Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 14:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642732#M235496</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-06T14:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to match text to field content in script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642733#M235497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =match('dx', $(=chr(39) &amp;amp; Replace(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.333333969116211px;"&gt;table_field1&lt;/SPAN&gt;, ';', chr(39) &amp;amp; ','&amp;nbsp; &amp;amp; chr(39)) &amp;amp; chr(39)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(as long as there is only one possible value of table_field1 (at the calculation point))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 14:53:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642733#M235497</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-06-06T14:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to match text to field content in script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642734#M235498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried this to. It works in a diagram, but not in Script!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Script, I am getting error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error in expression:&lt;/P&gt;&lt;P&gt;Match takes at least 2 parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx - Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 14:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642734#M235498</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-06T14:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to match text to field content in script?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642735#M235499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess I found a solution, I switch the match parameters, use substringcount and index instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUBSTRINGCOUNT(MID(table_field1,1,INDEX(';'&amp;amp;table_field1&amp;amp;';' , ';'&amp;amp;'dx'&amp;amp;';')), ';') + 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jun 2014 15:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-match-text-to-field-content-in-script/m-p/642735#M235499</guid>
      <dc:creator>hugmarcel</dc:creator>
      <dc:date>2014-06-06T15:26:21Z</dc:date>
    </item>
  </channel>
</rss>

