<?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 Escaping single quotes in set expression field values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200904#M503579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have developed an application which caches selections in the form of a set expression.&lt;/P&gt;&lt;P&gt;It seems to work fine, except when I have a string value with a single quote ['] character in it.&lt;/P&gt;&lt;P&gt;It's possible to escape this character by changing it to two single quotes [''], as is the case with SQL, but this results in the value not being properly recognized.&lt;/P&gt;&lt;P&gt;In the end, the solution I came up with is to use the apostrophe character [`] as the string delimiter. This works fine - as long as my text has no apostrophes in it.&lt;/P&gt;&lt;P&gt;I was also thinking of using double quotes ["] but this invokes a search query which is not necessary, since I know the values.&lt;/P&gt;&lt;P&gt;Anyone know of any solutions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Apr 2010 17:21:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-01T17:21:06Z</dc:date>
    <item>
      <title>Escaping single quotes in set expression field values</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200904#M503579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have developed an application which caches selections in the form of a set expression.&lt;/P&gt;&lt;P&gt;It seems to work fine, except when I have a string value with a single quote ['] character in it.&lt;/P&gt;&lt;P&gt;It's possible to escape this character by changing it to two single quotes [''], as is the case with SQL, but this results in the value not being properly recognized.&lt;/P&gt;&lt;P&gt;In the end, the solution I came up with is to use the apostrophe character [`] as the string delimiter. This works fine - as long as my text has no apostrophes in it.&lt;/P&gt;&lt;P&gt;I was also thinking of using double quotes ["] but this invokes a search query which is not necessary, since I know the values.&lt;/P&gt;&lt;P&gt;Anyone know of any solutions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 17:21:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200904#M503579</guid>
      <dc:creator />
      <dc:date>2010-04-01T17:21:06Z</dc:date>
    </item>
    <item>
      <title>Escaping single quotes in set expression field values</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200905#M503580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a field N which contains the string "T's" (T apostrope s).&lt;/P&gt;&lt;P&gt;I can use this expression to sum up value V:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;N={$(='T'&amp;amp;chr(39)&amp;amp;'s')}&amp;gt;}V)&lt;/P&gt;&lt;P&gt;It is not a full solution to your question, but probably gives you an idea.&lt;/P&gt;&lt;P&gt;hth,&lt;BR /&gt;Thilo&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 18:02:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200905#M503580</guid>
      <dc:creator />
      <dc:date>2010-04-01T18:02:07Z</dc:date>
    </item>
    <item>
      <title>Escaping single quotes in set expression field values</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200906#M503581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the tip.&lt;/P&gt;&lt;P&gt;In spite of my best efforts, I have never been able to the get the dollar-expansion to work for me in set expressions. Furthermore, the documentation shows that you're supposed to write it as $(#=[expression]), but the examples I've seen omit the hash sign.&lt;/P&gt;&lt;P&gt;Maybe it has to do with the fact that the field I'm restricting values for is an AND field (although I fail to see how pre-processing a string value would make any difference).&lt;/P&gt;&lt;P&gt;Even if I could get this working, this seems a bit excessive given how most other formula and programming languages have simpler ways to escape characters.&lt;/P&gt;&lt;P&gt;Hopefully the product managers of QlikView will address this in their next release.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 19:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200906#M503581</guid>
      <dc:creator />
      <dc:date>2010-04-01T19:20:51Z</dc:date>
    </item>
    <item>
      <title>Escaping single quotes in set expression field values</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200907#M503582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I recall, the # character forces the result to be a number. That's not typically necessary, and for text isn't desirable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 19:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200907#M503582</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-01T19:23:55Z</dc:date>
    </item>
    <item>
      <title>Escaping single quotes in set expression field values</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200908#M503583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the pointer. Didn't realize that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Apr 2010 19:33:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200908#M503583</guid>
      <dc:creator />
      <dc:date>2010-04-01T19:33:04Z</dc:date>
    </item>
    <item>
      <title>Escaping single quotes in set expression field values</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200909#M503584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, I don't think there's a good way to escape characters at the moment. Instead one has to work around it like you've done by using either double quotes if you want to escape a single quote etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Apr 2010 08:12:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200909#M503584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-04-05T08:12:51Z</dc:date>
    </item>
    <item>
      <title>Re: Escaping single quotes in set expression field values</title>
      <link>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200910#M503585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked perfect! Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 01:21:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Escaping-single-quotes-in-set-expression-field-values/m-p/200910#M503585</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-26T01:21:06Z</dc:date>
    </item>
  </channel>
</rss>

