<?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: Qlik Sense Mashup - using applyPatches to change measure in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/1828347#M15421</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I need to use&amp;nbsp;&lt;SPAN&gt;applyPatches method to change&amp;nbsp;some dimension property in a pivot table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a properties.js file to do that?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 18:26:02 GMT</pubDate>
    <dc:creator>Diego_Busilacchi</dc:creator>
    <dc:date>2021-08-12T18:26:02Z</dc:date>
    <item>
      <title>Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122679#M1708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having an issue trying to use the applyPatches method to change the measure in a pivot table.&amp;nbsp; I have been able to change the sort order and various other properties, but I assume there is a problem with the syntax of the JSON I am using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15383830131841827" jivemacro_uid="_15383830131841827"&gt;
&lt;P&gt;var patches = [{&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;'qPath': '/layout/qHyperCubeDef/qMeasures/0',&lt;/P&gt;
&lt;P&gt;'qOp': 'replace',&lt;/P&gt;
&lt;P&gt;'qValue': '{\'qDef\':\'Sum(Value)\'}'&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}];&lt;/P&gt;
&lt;P&gt;vis.applyPatches( patches, true );&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error I am getting is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="214787" alt="applyPatches Change Measure.PNG" class="jive-image image-1" src="/legacyfs/online/214787_applyPatches Change Measure.PNG" style="height: 204px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried without "layout" in the path, but I still get the error message.&amp;nbsp; Depending on the qValue entry, I can also get a slightly different error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="applyPatches Change Measure 2.PNG" class="jive-image image-2" src="/legacyfs/online/214802_applyPatches Change Measure 2.PNG" style="height: 59px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be gratefully received.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 08:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122679#M1708</guid>
      <dc:creator>rbartley</dc:creator>
      <dc:date>2018-10-01T08:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122680#M1709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Richard,&lt;/P&gt;&lt;P&gt;You're right there should be no '/layout' in your path, the path starts with '/qHyperCubeDef'. (You are actually not patching the layout but the properties structure). A good way to find to path is to use the /options/developer switch to inspect the objects properties. You will find something like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/214803_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;So the path will be '/qHyperCubeDef/qMeasures/0/qDef/qDef' (yes,there should be two qDef).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value should be a string in a string, something like '"Sum(Value)"'. You could also use JSON.stringify, but that's more if you need a structure with several properties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;P&gt;&lt;A href="https://extendingqlik.upper88.com/" title="https://extendingqlik.upper88.com/"&gt;https://extendingqlik.upper88.com/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 11:37:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122680#M1709</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2018-10-01T11:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122681#M1710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excellent response as always Erik.&amp;nbsp; Also, thanks for the /options/developer tip. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was confusing the layout with the properties, as you say, and forgetting the second qDef.&amp;nbsp; In the end, the following code works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15383972784074284 jive_text_macro" jivemacro_uid="_15383972784074284" modifiedtitle="true"&gt;
&lt;P&gt;var strMeasure= '"Sum(Value)"';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var patches = [{&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;'qPath': '/qHyperCubeDef/qMeasures/0/qDef/qDef',&lt;/P&gt;
&lt;P&gt;"qOp": "replace",&lt;/P&gt;
&lt;P&gt;'qValue':&amp;nbsp;&amp;nbsp; strMeasure&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;}];&lt;/P&gt;
&lt;P&gt;vis.applyPatches( patches, true );&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;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 12:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122681#M1710</guid>
      <dc:creator>rbartley</dc:creator>
      <dc:date>2018-10-01T12:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122682#M1711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more thing Erik.&amp;nbsp; Is it possible to apply more than one change, e.g. change measures and chart title in the same call to applyPatches?&amp;nbsp; If so, what would the syntax look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 13:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122682#M1711</guid>
      <dc:creator>rbartley</dc:creator>
      <dc:date>2018-10-01T13:48:41Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122683#M1712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, that's why it's an array. Just add some more patches to the array, the same syntax(qPath, qOp, qValue) for all of them. You can also use objects, if you for example want to change the sort order or something. In that case JSON.stringify is your friend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;P&gt;&lt;A href="https://extendingqlik.upper88.com/" title="https://extendingqlik.upper88.com/"&gt;https://extendingqlik.upper88.com/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Oct 2018 17:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122683#M1712</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2018-10-01T17:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122684#M1713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again Erik.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2018 16:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122684#M1713</guid>
      <dc:creator>rbartley</dc:creator>
      <dc:date>2018-10-02T16:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122685#M1714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You find more info on the developer menu here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/5725"&gt;Developer menu in Qlik Sense client&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erik Wetterberg&lt;/P&gt;&lt;P&gt;&lt;A href="https://extendingqlik.upper88.com/" title="https://extendingqlik.upper88.com/"&gt;https://extendingqlik.upper88.com/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2018 08:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/122685#M1714</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2018-10-03T08:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup - using applyPatches to change measure</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/1828347#M15421</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I need to use&amp;nbsp;&lt;SPAN&gt;applyPatches method to change&amp;nbsp;some dimension property in a pivot table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a properties.js file to do that?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 18:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-using-applyPatches-to-change-measure/m-p/1828347#M15421</guid>
      <dc:creator>Diego_Busilacchi</dc:creator>
      <dc:date>2021-08-12T18:26:02Z</dc:date>
    </item>
  </channel>
</rss>

