<?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 Get value of QV variable to use in JavaScript in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-value-of-QV-variable-to-use-in-JavaScript/m-p/851350#M1233619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I get the value of a single variable and use it in Javascript?&lt;/P&gt;&lt;P&gt;I need to get the current selection of a field from a variable and use this value as a string in order to do a if/else comparison.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;varQV = Only(Field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In JS I then want to do: if (varQV ="string of varQV") ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with the &lt;STRONG&gt;mydoc.GetAllVariables&lt;/STRONG&gt; function but I can't get the string of the field only the definition [Only(Field)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Thorsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2026-01-26T16:26:21Z</dc:date>
    <item>
      <title>Get value of QV variable to use in JavaScript</title>
      <link>https://community.qlik.com/t5/QlikView/Get-value-of-QV-variable-to-use-in-JavaScript/m-p/851350#M1233619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I get the value of a single variable and use it in Javascript?&lt;/P&gt;&lt;P&gt;I need to get the current selection of a field from a variable and use this value as a string in order to do a if/else comparison.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;varQV = Only(Field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In JS I then want to do: if (varQV ="string of varQV") ....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with the &lt;STRONG&gt;mydoc.GetAllVariables&lt;/STRONG&gt; function but I can't get the string of the field only the definition [Only(Field)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Thorsten&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jan 2026 16:26:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-value-of-QV-variable-to-use-in-JavaScript/m-p/851350#M1233619</guid>
      <dc:creator />
      <dc:date>2026-01-26T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Get value of QV variable to use in JavaScript</title>
      <link>https://community.qlik.com/t5/QlikView/Get-value-of-QV-variable-to-use-in-JavaScript/m-p/851351#M1233623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately it is not possible to get the evaluation of a variable using the &lt;SPAN style="font-family: courier new,courier;"&gt;GetAllVariables&lt;/SPAN&gt; function, only the definition is available in the returned object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However you can get the evaluation of the variable by using it in a Text expression of your extension property. In your &lt;SPAN style="font-family: courier new,courier;"&gt;definition.xml&lt;/SPAN&gt; file, add :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;lt;Text Expression="=varQV" /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will then be able to get the variable value in your javascript code with the following code in your extension method:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;var varQV = this.Layout.Text0.text;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2015 07:38:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-value-of-QV-variable-to-use-in-JavaScript/m-p/851351#M1233623</guid>
      <dc:creator />
      <dc:date>2015-04-30T07:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Get value of QV variable to use in JavaScript</title>
      <link>https://community.qlik.com/t5/QlikView/Get-value-of-QV-variable-to-use-in-JavaScript/m-p/851352#M1233626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A href="https://community.qlik.com/qlik-users/5871"&gt;jgeorge&lt;/A&gt;, it does not work for me.&lt;/P&gt;&lt;P&gt;I do as they write everywhere. But nothing happens.&lt;/P&gt;&lt;P&gt;QV 12 November release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you throw off the finished two files (.xml and .js)so that I can understand the error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 07:09:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-value-of-QV-variable-to-use-in-JavaScript/m-p/851352#M1233626</guid>
      <dc:creator>warfollowmy_ver</dc:creator>
      <dc:date>2018-10-22T07:09:08Z</dc:date>
    </item>
  </channel>
</rss>

