<?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 GetObjectField is not being updated when pivoting dimensions in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/GetObjectField-is-not-being-updated-when-pivoting-dimensions/m-p/1344211#M29737</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;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Summary:&lt;/STRONG&gt;&lt;/SPAN&gt; using &lt;EM&gt;GetObjectField(Dimensionality()-1)&lt;/EM&gt; as a measure in a pivot table shows correct Field names at first, but when you then proceed to&lt;STRONG&gt; pivot some dimensions&lt;/STRONG&gt;, this measure &lt;STRONG&gt;does not stay up to date&lt;/STRONG&gt; with the new indexes. However, if I pivot in &lt;STRONG&gt;Edit mode&lt;/STRONG&gt; sliding up and down the dimensions in the properties pane, it &lt;STRONG&gt;does work&lt;/STRONG&gt;. Is this a bug or what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that, depending on both the expansion level and its value for each register the calculation done should vary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More specifically:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF( //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Dimensionality()=1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null(),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF( //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimensionality()=2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #99cc00;"&gt;DIMENSION2&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1,DIMENSION2&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;) //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That code above is the prototype of what I seek, because it relies on a specific dimensions order in the pivot table. In order to make it pivot-independent I intended to make use of the &lt;EM&gt;GetObjectField&lt;/EM&gt; function (actually, &lt;EM&gt;GetObjectDimension&lt;/EM&gt; would be much better but since there is &lt;STRONG&gt;no documentation &lt;/STRONG&gt;whatsoever I feel reluctant about it) along with &lt;EM&gt;Dimensionality&lt;/EM&gt;. Thus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF( //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Dimensionality()=1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #0000ff;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null(),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF( //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimensionality()=2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-2)&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;) //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;And from then on, optimize the code since this could scale to heinous lengths. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #ff6600; text-decoration: underline; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;The problem is that &lt;EM&gt;GetObjectField(Dimensionality()-1)&lt;/EM&gt; is not updating when you pivot alongside the table, not out of edit mode!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: luis martin-roldan

I removed "Bug Report:" from the title as it was rather scandalous and unnecesary.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 May 2017 11:03:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-26T11:03:57Z</dc:date>
    <item>
      <title>GetObjectField is not being updated when pivoting dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetObjectField-is-not-being-updated-when-pivoting-dimensions/m-p/1344211#M29737</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;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Summary:&lt;/STRONG&gt;&lt;/SPAN&gt; using &lt;EM&gt;GetObjectField(Dimensionality()-1)&lt;/EM&gt; as a measure in a pivot table shows correct Field names at first, but when you then proceed to&lt;STRONG&gt; pivot some dimensions&lt;/STRONG&gt;, this measure &lt;STRONG&gt;does not stay up to date&lt;/STRONG&gt; with the new indexes. However, if I pivot in &lt;STRONG&gt;Edit mode&lt;/STRONG&gt; sliding up and down the dimensions in the properties pane, it &lt;STRONG&gt;does work&lt;/STRONG&gt;. Is this a bug or what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing is that, depending on both the expansion level and its value for each register the calculation done should vary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More specifically:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF( //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Dimensionality()=1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null(),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF( //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimensionality()=2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #99cc00;"&gt;DIMENSION2&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #99cc00;"&gt;DIMENSION1,DIMENSION2&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;) //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That code above is the prototype of what I seek, because it relies on a specific dimensions order in the pivot table. In order to make it pivot-independent I intended to make use of the &lt;EM&gt;GetObjectField&lt;/EM&gt; function (actually, &lt;EM&gt;GetObjectDimension&lt;/EM&gt; would be much better but since there is &lt;STRONG&gt;no documentation &lt;/STRONG&gt;whatsoever I feel reluctant about it) along with &lt;EM&gt;Dimensionality&lt;/EM&gt;. Thus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF( //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Dimensionality()=1,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #0000ff;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Null(),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF( //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dimensionality()=2,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IsNull(&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(TOTAL &amp;lt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-2)&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px; font-family: 'courier new', courier;"&gt;GetObjectField(Dimensionality()-1)&lt;/SPAN&gt;&amp;gt; VALUE),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [...]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) //lvl2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;) //lvl1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;And from then on, optimize the code since this could scale to heinous lengths. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;SPAN style="color: #ff6600; text-decoration: underline; font-family: arial, helvetica, sans-serif;"&gt;&lt;STRONG&gt;The problem is that &lt;EM&gt;GetObjectField(Dimensionality()-1)&lt;/EM&gt; is not updating when you pivot alongside the table, not out of edit mode!&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: luis martin-roldan

I removed "Bug Report:" from the title as it was rather scandalous and unnecesary.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2017 11:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetObjectField-is-not-being-updated-when-pivoting-dimensions/m-p/1344211#M29737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-26T11:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: GetObjectField is not being updated when pivoting dimensions</title>
      <link>https://community.qlik.com/t5/App-Development/GetObjectField-is-not-being-updated-when-pivoting-dimensions/m-p/1344212#M29738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Recieved input on the matter directly from Qlik Support (thankfully).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an extract of their answer:&lt;/P&gt;&lt;P&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; background: #ffffff; color: #737373; font-family: arial, verdana, sans-serif;"&gt;In order to verify what I'm saying here, you can open Chrome developer tools and get into the WebSocket frames tab, to see exactly what happens between the Client and Engine of Qlik Sense.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;1. When you are re-organizing the order in Pivot table out of the Edit mode, the changes you made are only "soft changes" to the layout. You can verify this in the communication in WebSocket. There are only "ApplyPatches" and "GetLayout" requests sent to and replied by engine. This will only determine the new order of the dimensions in the apparance of the object. The data structure of the object on Engine side is still the old one. That's why you don't see the change reflected in the object, because the 2 functions will calculate based on the real position of the fields in the object.&lt;/P&gt;
&lt;P&gt;2. Now if you open the Edit mode with the "soft change" there, you will be prompted to either Apply or Discard the change when you select the object. Select "Apply". Even at this stage it just confirms the order change in the object apparance, not the actual data structure in the object on Engine side. You will get a response like "qInterColumnSortOrder:[2, 3, 0, 1, 4, 5, 6, -1]", which the actual position the functions are using for calculation is still [0,1, 2, 3, 4, 5, 6, -1] .&lt;/P&gt;
&lt;P&gt;3. Now if you change the order by move them in the properties pannel, you will see that the client will send a SetProperties and GetProperties requests. Now the actual position in the object on Engine side and the layout coming after that are both changed. And this is why your calculation is working again.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; background: #ffffff; color: #737373; font-family: arial, verdana, sans-serif;"&gt;This is by far as design of how Pivot table works in Qlik Sense. Therefore unfortunately your original plan won't work under this design.&lt;/P&gt;






&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 11:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/GetObjectField-is-not-being-updated-when-pivoting-dimensions/m-p/1344212#M29738</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-21T11:16:10Z</dc:date>
    </item>
  </channel>
</rss>

