<?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: Using  Variable with GetFieldSelections()  in the script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057634#M16903</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Isaac,&amp;nbsp; I guess I would need to know more about what you are trying to do, and the usecase. Because technically we don't work like a SQL query tool. All the data is loaded from the source into the app and then is on the fly filtered using the client interface and selection objects in the app. It seems to me you are trying to limit the data loaded into the app based of of a previous selection. This still may be possible, but I am not sure how - I added a colleague, whom if he has a moment might respond as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/57513"&gt;jpe&lt;/A&gt;‌ &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Apr 2016 19:35:27 GMT</pubDate>
    <dc:creator>Michael_Tarallo</dc:creator>
    <dc:date>2016-04-19T19:35:27Z</dc:date>
    <item>
      <title>Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057630#M16899</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;&lt;SPAN lang="en"&gt;I am trying to create a new table from the filters selected in a sheet and using this variable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vSelections=GetFieldSelections(machine_PO) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;The problem is that the script interprets the variable as: ' GetFieldSelections ( machine_PO )' and not as its text value&lt;BR /&gt;such as ' Machine11 ' .&lt;BR /&gt;I have the following in the load :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;load &lt;/P&gt;&lt;P&gt;code,&lt;/P&gt;&lt;P&gt;machine,&lt;/P&gt;&lt;P&gt;time&lt;/P&gt;&lt;P&gt;resident Production&lt;/P&gt;&lt;P&gt;where machine=$(vSelections);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I tried also with ' $ ( vSelections )' but still does not work .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I am using a qlik sense desktop.&lt;BR /&gt;&lt;BR /&gt;Any possible solution ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 10:34:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057630#M16899</guid>
      <dc:creator />
      <dc:date>2016-04-19T10:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057631#M16900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GetFieldSelections() is front end only function and can't be used in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you would need to create a variable that holds the value (and not the function to retrieve the value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In QV, we could use triggers and an action to set the value 'Machine11' to a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In QS, I don't think we have these means.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hm, not sure how to resolve this (I still haven't looked very deep into QS).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe &lt;A href="https://community.qlik.com/qlik-users/77808"&gt;mto&lt;/A&gt;‌ has a good advice?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 13:25:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057631#M16900</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-04-19T13:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057632#M16901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like this ? - see sample attached app.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" height="287" src="https://community.qlik.com/legacyfs/online/122043_pastedImage_0.png" style="width: 491px; height: 287.473px;" width="491" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/122044_pastedImage_76.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this using the new variables interface:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9257"&gt;Qlik Sense - Variables Interface (video)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As Stefan pointed out - GetFieldSelections is a client side, object expression - and not meant to be run in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please copy .qvf file to your C:\Users\&amp;lt;user profile&amp;gt;\Documents\Qlik\Sense\Apps and refresh Qlik Sense Desktop with F5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know how you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mike Tarallo&lt;/P&gt;&lt;P&gt;Qlik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 17:21:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057632#M16901</guid>
      <dc:creator>Michael_Tarallo</dc:creator>
      <dc:date>2016-04-19T17:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057633#M16902</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;&lt;SPAN lang="en"&gt;Firstly&lt;/SPAN&gt; t&lt;SPAN lang="en"&gt;hanks for the answers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Michael what I really need is to use (vSelection) as a filter in an expression like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&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;code,&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;machine,&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;time&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;resident Production&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where machine=$(vSelections);&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&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 style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN lang="en"&gt;But as you say , the GetFieldSelections function can not be used in the script. So, I would&amp;nbsp; need to get a variable with the textual value resulting from (vSelection) .But this is &lt;SPAN lang="en"&gt;probably&lt;/SPAN&gt; not possible.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN lang="en"&gt;&lt;BR /&gt;Thank you again.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 18:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057633#M16902</guid>
      <dc:creator />
      <dc:date>2016-04-19T18:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057634#M16903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Isaac,&amp;nbsp; I guess I would need to know more about what you are trying to do, and the usecase. Because technically we don't work like a SQL query tool. All the data is loaded from the source into the app and then is on the fly filtered using the client interface and selection objects in the app. It seems to me you are trying to limit the data loaded into the app based of of a previous selection. This still may be possible, but I am not sure how - I added a colleague, whom if he has a moment might respond as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/57513"&gt;jpe&lt;/A&gt;‌ &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 19:35:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057634#M16903</guid>
      <dc:creator>Michael_Tarallo</dc:creator>
      <dc:date>2016-04-19T19:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057635#M16904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;Hi,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I will try to expose the use case in question.&lt;BR /&gt;From a main table ( Production) , with the following fields :&lt;BR /&gt;Codigo_OP ( Orden Produccion )&lt;BR /&gt;Machine ( Maquina )&lt;BR /&gt;Item ( Pieza)&lt;BR /&gt;RealBegin(Fecha Inicio Seleccion)&lt;BR /&gt;RealEnd(Fecha Fin Seleccion)&lt;BR /&gt;I create another new table ( Production_timeline ) only with machines that have worked within the specified date range , using for this the Reload extension.&lt;BR /&gt;( This is necessary because google api I'm using does not allow Measures )&lt;BR /&gt;&lt;BR /&gt;Then the table ( Production_timeline ) is shown in the timeline and chart table.&lt;BR /&gt;Well, what the customer really wants is to select date range and machine and make a new reload with those filters and for this I need to know which machine is selecting , but&amp;nbsp; with GetFieldSelections () as you have said is not possible.&lt;BR /&gt;&lt;BR /&gt;I hope I explained , but ask me anything.&lt;BR /&gt;&lt;BR /&gt;Thanks again for all&lt;IMG alt="screen.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/122135_screen.PNG" style="height: 425px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 08:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057635#M16904</guid>
      <dc:creator />
      <dc:date>2016-04-20T08:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057636#M16905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;instead of getfieldselections([Field]) i usually suggest using concat() instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Concat( distinct&amp;nbsp; [Field]&amp;nbsp; , ';' )&amp;nbsp; ...will create a ; delimitted list of [Field] values in the possible current state.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could use a single quote character as well&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;chr(39) &amp;amp; Concat( distinct&amp;nbsp; [Field]&amp;nbsp; , chr(39) &amp;amp; ',' &amp;amp; chr(39) )&amp;nbsp; &amp;amp; chr(39)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;... this would create a string like this :&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Canada','USA'&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Apr 2016 19:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057636#M16905</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2016-04-22T19:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057637#M16906</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;&lt;SPAN lang="en"&gt;I tried your solution , but I still have the same problem:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #ff0000; font-family: monospace; font-size: 13px;"&gt;Maquina=chr(39) &amp;amp; Concat( distinct (Maquina) , chr(39) &amp;amp; ',' &amp;amp; chr(39) ) &amp;amp; chr(39)&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN lang="en"&gt;I still do not get the textual dimension value in a variable.&lt;BR /&gt;Thanks anyway for your answer.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Apr 2016 11:55:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/1057637#M16906</guid>
      <dc:creator />
      <dc:date>2016-04-23T11:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using  Variable with GetFieldSelections()  in the script</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/2501378#M103320</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have the same use case and i don't have a solution&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what i have suggest to users that they have the list and then if they whant to limit the data they put it in an inline manuelly and then it work but it is not pratic&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2025 09:21:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Variable-with-GetFieldSelections-in-the-script/m-p/2501378#M103320</guid>
      <dc:creator>mouha</dc:creator>
      <dc:date>2025-01-15T09:21:14Z</dc:date>
    </item>
  </channel>
</rss>

