<?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 [Simple problem] This IF statement with OR's won't evaluate because the search value has a single quotes. How to fix this? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940173#M648416</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following IF statement in my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(CategoryName = 'Women's Clothes' or CategoryName= 'Sportswear' or CategoryName = 'Men's Footwear', 1,0) as CategoryType&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the script won't run because Women's Clothes and Men's footwear actually contain single quotes too and Qlikview sees this as a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I could do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(CategoryName = "Women's Clothes" or CategoryName= 'Sportswear' or CategoryName = "Men's Footwear", 1,0) as CategoryType&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(CategoryName = [Women's Clothes] or CategoryName= 'Sportswear' or CategoryName = [Men's Footwear], 1,0) as CategoryType&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;Does anyone know how to fix this minor issue in my IF statement please? &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, 21 Oct 2015 15:38:50 GMT</pubDate>
    <dc:creator>jblomqvist</dc:creator>
    <dc:date>2015-10-21T15:38:50Z</dc:date>
    <item>
      <title>[Simple problem] This IF statement with OR's won't evaluate because the search value has a single quotes. How to fix this?</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940173#M648416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following IF statement in my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(CategoryName = 'Women's Clothes' or CategoryName= 'Sportswear' or CategoryName = 'Men's Footwear', 1,0) as CategoryType&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the script won't run because Women's Clothes and Men's footwear actually contain single quotes too and Qlikview sees this as a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I could do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(CategoryName = "Women's Clothes" or CategoryName= 'Sportswear' or CategoryName = "Men's Footwear", 1,0) as CategoryType&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(CategoryName = [Women's Clothes] or CategoryName= 'Sportswear' or CategoryName = [Men's Footwear], 1,0) as CategoryType&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;Does anyone know how to fix this minor issue in my IF statement please? &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, 21 Oct 2015 15:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940173#M648416</guid>
      <dc:creator>jblomqvist</dc:creator>
      <dc:date>2015-10-21T15:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: [Simple problem] This IF statement with OR's won't evaluate because the search value has a single quotes. How to fix this?</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940174#M648417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Match(CategoryName, 'Women' &amp;amp; Chr(39) &amp;amp; 's Clothes', 'Sportswear', 'Men' &amp;amp; Chr(39) &amp;amp; 's Footwear'), 1, 0) as CategoryType&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Script:&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/102698_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; If(Match(CategoryName, 'Women' &amp;amp; Chr(39) &amp;amp; 's Clothes', 'Sportswear', 'Men' &amp;amp; Chr(39) &amp;amp; 's Footwear'), 1, 0) as CategoryType;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CategoryName&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Women's Clothes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sportswear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Men's Footwear&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ABC&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DEF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GHI&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&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;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 15:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940174#M648417</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-21T15:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: [Simple problem] This IF statement with OR's won't evaluate because the search value has a single quotes. How to fix this?</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940175#M648418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are a star! Thanks that works. I thought about using the Chr function but figured there might be a simpler way than that. Maybe not I guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 15:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940175#M648418</guid>
      <dc:creator>jblomqvist</dc:creator>
      <dc:date>2015-10-21T15:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: [Simple problem] This IF statement with OR's won't evaluate because the search value has a single quotes. How to fix this?</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940176#M648419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there is also the easier option using an escape sequence with two single quotes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If(&lt;STRONG&gt;Match(CategoryName, 'Women''s Clothes', 'Sportswear', 'Men''s Footwear')&lt;/STRONG&gt;, 1, 0) as CategoryType;&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;/P&gt;&lt;P&gt;CategoryName&lt;/P&gt;&lt;P&gt;Women's Clothes&lt;/P&gt;&lt;P&gt;Sportswear&lt;/P&gt;&lt;P&gt;Men's Footwear&lt;/P&gt;&lt;P&gt;ABC&lt;/P&gt;&lt;P&gt;DEF&lt;/P&gt;&lt;P&gt;GHI&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4232"&gt;Escape sequences&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Oct 2015 23:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-problem-This-IF-statement-with-OR-s-won-t-evaluate/m-p/940176#M648419</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-10-21T23:16:04Z</dc:date>
    </item>
  </channel>
</rss>

