<?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 ApplyPatches API throwing Invalid Parameters in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577974#M10491</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You're right: your qValue is not correct. It should be a string in a string, so perhaps:&lt;/P&gt;&lt;P&gt;qValue: '"Country"'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or you can use JSON.stringify:&lt;/P&gt;&lt;P&gt;qValue: JSON.stringify('Country')&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2019 13:45:13 GMT</pubDate>
    <dc:creator>ErikWetterberg</dc:creator>
    <dc:date>2019-05-08T13:45:13Z</dc:date>
    <item>
      <title>Qlik Sense ApplyPatches API throwing Invalid Parameters</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577967#M10490</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/1222" target="_blank"&gt;@dselgo_eidex&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6966" target="_blank"&gt;@erik_wetterberg&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Can you help me on how to replace the dimension/measure of a bar or pie chart using ApplyPatches or SetOptions API..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I used the following mashup from the&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://github.com/erikwett/QonnectionsMashup" target="_blank" rel="noopener nofollow noopener noreferrer"&gt;https://github.com/erikwett/QonnectionsMashup&lt;/A&gt;by&amp;nbsp;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6966" target="_blank"&gt;@erik_wetterberg&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;but it was throwing me invalid parameters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The existing dimension is City and i'd like to change it to Country.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Is my qValue correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I have the following code&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;var patches = [{&lt;BR /&gt;'qPath': '/qHyperCubeDef/qDimensionInfo/0',&lt;BR /&gt;'qOp': 'replace',&lt;BR /&gt;'qValue': \"Country\"&lt;BR /&gt;}];&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;vis.applyPatches( patches, false );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Any help would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 13:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577967#M10490</guid>
      <dc:creator>nitinsaivishnu1</dc:creator>
      <dc:date>2019-05-08T13:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense ApplyPatches API throwing Invalid Parameters</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577974#M10491</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You're right: your qValue is not correct. It should be a string in a string, so perhaps:&lt;/P&gt;&lt;P&gt;qValue: '"Country"'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or you can use JSON.stringify:&lt;/P&gt;&lt;P&gt;qValue: JSON.stringify('Country')&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 13:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577974#M10491</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2019-05-08T13:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense ApplyPatches API throwing Invalid Parameters</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577989#M10492</link>
      <description>&lt;P&gt;Hi Erik,&lt;/P&gt;&lt;P&gt;Thank you for the fast reply.&lt;/P&gt;&lt;P&gt;I tried changing it to both the values you suggested. It still throws me Invalid Parameters&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patch.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11686iE67E30E82C7C7FBB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Patch.png" alt="Patch.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 13:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577989#M10492</guid>
      <dc:creator>nitinsaivishnu1</dc:creator>
      <dc:date>2019-05-08T13:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense ApplyPatches API throwing Invalid Parameters</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577991#M10493</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I see now that the path is also wrong, applyPatch patches properties, qDimensionInfo is in the layout, it's called qDimensions in the properties.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/April2018/APIs/EngineAPI/definitions-HyperCubeDef.html" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/April2018/APIs/EngineAPI/definitions-HyperCubeDef.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 14:05:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577991#M10493</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2019-05-08T14:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense ApplyPatches API throwing Invalid Parameters</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577993#M10494</link>
      <description>&lt;P&gt;Your path isn't quite right: use &lt;FONT face="courier new,courier"&gt;qDimensions&lt;/FONT&gt; instead of &lt;FONT face="courier new,courier"&gt;qDimensionInfo.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;In addition, the content of qHyperCubeDef/qDimensions/0 is an &lt;A href="https://help.qlik.com/en-US/sense-developer/February2019/APIs/EngineAPI/definitions-NxDimension.html" target="_self"&gt;NxDimension&lt;/A&gt;, so replacing that entire struct with a string is not valid, you need to replace the definition of the inline dimension:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  'qPath': '/qHyperCubeDef/qDimensions/0/qDef/qFieldDefs/0',
  'qOp': 'replace',
  'qValue': '"Country"'
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 May 2019 14:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1577993#M10494</guid>
      <dc:creator>mek</dc:creator>
      <dc:date>2019-05-08T14:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense ApplyPatches API throwing Invalid Parameters</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1578101#M10500</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/36436"&gt;@mek&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. It worked like a charm &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can you also help me with changing the chart type as well ? Let's say a bar chart to pie chart?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pardon me for not knowing the qPath&amp;nbsp; correctly.&lt;/P&gt;&lt;P&gt;Will this work?&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;'qPath': '/qInfo/qType',&lt;BR /&gt;'qOp': 'replace',&lt;BR /&gt;'qValue': '"piechart"'&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 18:43:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-ApplyPatches-API-throwing-Invalid-Parameters/m-p/1578101#M10500</guid>
      <dc:creator>nitinsaivishnu1</dc:creator>
      <dc:date>2019-05-08T18:43:35Z</dc:date>
    </item>
  </channel>
</rss>

