<?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: GetFieldSelections does not work for dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313506#M28114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not entirely sure what you are trying to do, but try dollar sign expansion may be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;GetFieldSelections(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MyDimension&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Mar 2017 15:45:32 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-03-30T15:45:32Z</dc:date>
    <item>
      <title>GetFieldSelections does not work for dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313505#M28113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use GetFieldSelections(MyDimension) it returns no results.&lt;/P&gt;&lt;P&gt;If I used it like &lt;SPAN style="font-size: 13.3333px;"&gt;GetFieldSelections&lt;/SPAN&gt;([The_Expression_I_use_In_My_Dimension]) it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this behavior by design or I'm not using the right syntax.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For example: MyDimension: If(MyField = $(VMyVar), &lt;SPAN style="font-size: 13.3333px;"&gt;MyField&lt;/SPAN&gt;, Null)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GetFieldSelections(&lt;SPAN style="font-size: 13.3333px;"&gt;MyDimension&lt;/SPAN&gt;) - no results&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GetFieldSelections([&lt;SPAN style="font-size: 13.3333px;"&gt; If(MyField = $(VMyVar), &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;MyField&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;, Null)&lt;/SPAN&gt;]) - works as expected.&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;Any input will be greatly appreciated.&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;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 15:41:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313505#M28113</guid>
      <dc:creator />
      <dc:date>2017-03-30T15:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelections does not work for dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313506#M28114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not entirely sure what you are trying to do, but try dollar sign expansion may be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;GetFieldSelections(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MyDimension&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Mar 2017 15:45:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313506#M28114</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-30T15:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelections does not work for dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313507#M28115</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;Thanks for responding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to identify a value selected in a calculated dimension.&lt;/P&gt;&lt;P&gt;The &lt;STRONG style="color: #3d3d3d; font-size: 13.3333px; font-style: inherit; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-weight: inherit;"&gt;GetFieldSelections &lt;/STRONG&gt;function only works if I put the expression instead of the dimension name.&lt;/P&gt;&lt;P&gt;I have lareday tried the suggested syntax, to no avail unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;In my case I need calculated dimensions as I use the filters from qsVariable input, but this is a different topic.&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;&lt;SPAN style="font-size: 13.3333px;"&gt;To reproduce the issue I'm asking about simply try to create a dimension that concatenates 2 fields and then use &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px;"&gt;GetFieldSelections first with the same concatenation expression - that one would work and next with your dimension name, that one won't work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;I'm trying to understand the cause of this behavior - bug or feature and if there's a way around it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-style: inherit; font-weight: inherit;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Mar 2017 07:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313507#M28115</guid>
      <dc:creator />
      <dc:date>2017-03-31T07:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelections does not work for dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313508#M28116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can we see a small fragment of your source data, for example in Excel and what do you want to get as a result on them?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 08:42:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313508#M28116</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-04-03T08:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelections does not work for dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313509#M28117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I created a simple app but I can't attach it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue still can be reproduced, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the loader create table Items as:&lt;/P&gt;&lt;P&gt;Items:&lt;/P&gt;&lt;P&gt;LOAD * INLINE&lt;/P&gt;&lt;P&gt;[OrderDate, Code, Quantity&lt;/P&gt;&lt;P&gt;'2017-03-01', 'ISBN0001', 3&lt;/P&gt;&lt;P&gt;'2017-03-01', 'ISBN0002', 5&lt;/P&gt;&lt;P&gt;'2017-03-01', 'ISBN0003', 9&lt;/P&gt;&lt;P&gt;'2017-03-02', 'ISBN0004', 1&lt;/P&gt;&lt;P&gt;'2017-03-02', 'ISBN0005', 2&lt;/P&gt;&lt;P&gt;'2017-03-02', 'ISBN0003', 1&lt;/P&gt;&lt;P&gt;'2017-03-02', 'ISBN0001', 1&lt;/P&gt;&lt;P&gt;'2017-03-03', 'ISBN0002', 1&lt;/P&gt;&lt;P&gt;'2017-03-03', 'ISBN0004', 3&lt;/P&gt;&lt;P&gt;'2017-03-05', 'ISBN0010', 5&lt;/P&gt;&lt;P&gt;'2017-03-05', 'ISBN0002', 1&lt;/P&gt;&lt;P&gt;'2017-03-06', 'ISBN0005', 1&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new sheet, name it Items Summary&lt;/P&gt;&lt;P&gt;Create new variables; &lt;/P&gt;&lt;P&gt;Variables:&lt;/P&gt;&lt;P&gt;Name: vCode Definition:&amp;nbsp; Code&lt;/P&gt;&lt;P&gt;Name: vOrderDateStart Definition:&amp;nbsp; OrderDate&lt;/P&gt;&lt;P&gt;Name: vOrderDateEnd Definition:&amp;nbsp; OrderDate&lt;/P&gt;&lt;P&gt;Create 2 variable objects called DateStart and DateEnd and associate them with the &lt;SPAN style="font-size: 13.3333px;"&gt;vOrderDateStart and &lt;SPAN style="font-size: 13.3333px;"&gt;vOrderDateEnd &lt;/SPAN&gt; accordingly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create the following dimensions:&lt;/P&gt;&lt;P&gt;OrderDatesInRange:If(OrderDate &amp;gt;= '$(vOrderDateStart)' And OrderDate &amp;lt;= '$(vOrderDateEnd)', Date(OrderDate, 'DD/MM/YYYY'), Null)&lt;/P&gt;&lt;P&gt;CodesInRange: If(OrderDate &amp;gt;= '$(vOrderDateStart)' And OrderDate &amp;lt;= '$(vOrderDateEnd)', Code, Null)&lt;/P&gt;&lt;P&gt;CodesInRangeNotWorking: If(IsNull([OrderDatesInRange]) = True , Null, [Code])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SelectedItem: If(Code = GetFieldSelections([=If(OrderDate &amp;gt;= '$(vOrderDateStart)' And OrderDate &amp;lt;= '$(vOrderDateEnd)', Code, Null)]), Code, Null)&lt;/P&gt;&lt;P&gt;SelectedItemNotWorking: If(Code = GetFieldSelections([CodesInRange]), Code, Null)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you&amp;nbsp; bring them to the sheet and enter the date range between 01/03 and 03/03 for example you will see that CodesInRange shows the codes associated with the entered dates while CodesInRangeNotWorking still lists all codes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you select 1 of the codes SelectedItem will show it but SelectedItemNotWorking will not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The difference is that in the not working dimensions I refer to another dimension name, while in the working dimensions I use the full expression,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this makes more sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there's a way to attach the application, please could you let me know how to do so and I will attach it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 14:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313509#M28117</guid>
      <dc:creator />
      <dc:date>2017-04-05T14:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelections does not work for dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313510#M28118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrei,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To attach a file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/159272_1.jpg" style="height: 358px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/159273_2.jpg" style="height: 422px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;3. From From the folder "F:\Users\[Your UserName]\Qlik\Sense\Apps" add your file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Apr 2017 13:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313510#M28118</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-04-06T13:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: GetFieldSelections does not work for dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313511#M28119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for the instructions.&lt;/P&gt;&lt;P&gt;I attached my repro file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has 2 sheets - one with the issue in question and another with a workaround that was sufficient for me.&lt;/P&gt;&lt;P&gt;I added comments to each of the sheets, so hopefully it's clear enough what the issue is about and how to workaround it if needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The behavior of the GetFieldSelections function is interesting though - why won't it work if I use the calculated dimension's name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again, for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 09:36:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetFieldSelections-does-not-work-for-dimensions/m-p/1313511#M28119</guid>
      <dc:creator />
      <dc:date>2017-04-07T09:36:30Z</dc:date>
    </item>
  </channel>
</rss>

