<?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: Evaluate variable in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961492#M644519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to do this at script level, check the Lookup() function. It will do exactly the same thing as your expression, but this time in the script. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vHITS = Lookup('$(vLanguage)', 'ID', 25, 'Translation');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But like the other posters, I don't really understand what you're trying to accomplish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Dec 2015 10:01:13 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2015-12-07T10:01:13Z</dc:date>
    <item>
      <title>Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961487#M644512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to look at a table from variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My set-up&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Languages:&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;Language&lt;/P&gt;&lt;P&gt;EN,&lt;/P&gt;&lt;P&gt;AL,&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;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Tansalation:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[..\Config\For Translation.xls]&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is UniqueObjectID$);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Expressions in GUI are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;vLanguage:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=chr(39)&amp;amp; Language&amp;amp; chr(39)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then for each field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=fieldvalue($(&lt;STRONG&gt;vLanguage&lt;/STRONG&gt;),25)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is looking at the table with &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;translation&lt;/STRONG&gt;&lt;/SPAN&gt; and picking up the right field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I will wrap this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vHITS:fieldvalue($(vLanguage),25)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the evaluation will take place at script level?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying few option but&amp;nbsp; none is working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The aim is to have all fields replace with variables from external sources&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 09:08:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961487#M644512</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-12-07T09:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961488#M644513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, evalution will take place on the fly,&lt;/P&gt;&lt;P&gt;see the attached example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 09:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961488#M644513</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2015-12-07T09:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961489#M644514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank Peter,&lt;/P&gt;&lt;P&gt;This is what I got so far.&lt;/P&gt;&lt;P&gt;So I assume there is no way to evaluate/lookup for the value at script level?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 09:46:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961489#M644514</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-12-07T09:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961490#M644515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do this,&lt;/P&gt;&lt;P&gt;x:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EN,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[..\Config\For Translation.xls]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(biff, embedded labels, table is UniqueObjectID$);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vHit1 = Num(Peek('ID', 0, 'x'));&lt;/P&gt;&lt;P&gt;LET vHit2= Num(Peek('ID', 1, 'x'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use two different variables for the same&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 09:49:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961490#M644515</guid>
      <dc:creator>saumyashah90</dc:creator>
      <dc:date>2015-12-07T09:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961491#M644516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand your aim and why - what is the benefit? Maybe a short example is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 09:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961491#M644516</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-12-07T09:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961492#M644519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to do this at script level, check the Lookup() function. It will do exactly the same thing as your expression, but this time in the script. For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vHITS = Lookup('$(vLanguage)', 'ID', 25, 'Translation');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But like the other posters, I don't really understand what you're trying to accomplish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 10:01:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961492#M644519</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-07T10:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961493#M644520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you are trying. Evaluating variable (from GUI) in script? If so, instaed of assign the field selection in variable (using variable definition), try using trigger like in attached sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 10:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961493#M644520</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-12-07T10:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961494#M644523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for the input.&lt;/P&gt;&lt;P&gt;I maybe have gone too far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As this part '$(vLanguage)' must be evaluate before script finished:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;looking at the language&amp;nbsp; table and pick up the right value&lt;/P&gt;&lt;P&gt;and as no selection has been made yet&lt;/P&gt;&lt;P&gt;as we woudl do in GUI:&lt;/P&gt;&lt;P&gt;"EN " selected in List box , expression&amp;nbsp;&amp;nbsp; (fieldvalue($(vLanguage),25)&amp;nbsp;&amp;nbsp; evaluates&amp;nbsp; to field from ID=25)&lt;/P&gt;&lt;P&gt;this is probably no way to do this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 10:25:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961494#M644523</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-12-07T10:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961495#M644525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To put all variables as external sources.,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 10:25:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961495#M644525</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-12-07T10:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961496#M644528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course there is a way to do this. Make sure that every selection in your languages list box (always a single one I guess) sets a variable vLanguage. Variables will not be cleared if you reload your document so they can be used to pass parameters from the UI to your script. This is a way to load only one language in an otherwise multi-language document (for example by repetitively passing a parameter in the task definition and repeating the reload for every language available)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it's still not clear what you are trying to accomplish. As far as I know, QV documents work best if they include every piece of information and data that an(y) end-user could possibly be interested in. Not by asking the user what he's up to and then reloading just that bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example of how this works in an extremely dyynamic way, you could store the preferred language of every user in the SA table, and let QV throw out all irrelevant languages by simple data reduction when the user opens the document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or are we on the wrong track here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 10:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961496#M644528</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-07T10:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961497#M644529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you provide an example of your first suggestion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right you can not pass GUI parameters to script probably that's why the vLanguage will not be evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My aim was to move&amp;nbsp; all expressions to qvd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the a way to use somehow the IF statement to give the variable first language at script level and then when there is selection from listbox change the language.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The language I'm working on in nothing that QV supports.&lt;/P&gt;&lt;P&gt;So using SA table is not a option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 11:23:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961497#M644529</guid>
      <dc:creator>robert_mika</dc:creator>
      <dc:date>2015-12-07T11:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate variable in script</title>
      <link>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961498#M644530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To show you that a document UI &lt;EM&gt;can&lt;/EM&gt; pass values to the script, see the attachment. It may be useful for your situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The document uses a listbox to control the reload. It does not control languiage selection in real-time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Dec 2015 13:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Evaluate-variable-in-script/m-p/961498#M644530</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-12-07T13:03:00Z</dc:date>
    </item>
  </channel>
</rss>

