<?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: setOptions not working for pivot table in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550054#M10075</link>
    <description>I tried it. Still receiving the same error.</description>
    <pubDate>Wed, 27 Feb 2019 18:43:59 GMT</pubDate>
    <dc:creator>dselgo_eidex</dc:creator>
    <dc:date>2019-02-27T18:43:59Z</dc:date>
    <item>
      <title>setOptions not working for pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550020#M10073</link>
      <description>&lt;P&gt;Hello, I am having a problem using the Visualization APIs &lt;A href="https://help.qlik.com/en-US/sense-developer/February2019/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/VisualizationAPI/setOptions-method.htm" target="_self"&gt;setOptions&lt;/A&gt; method for my pivot table. Each time I try, I get the following error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="name"&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="object-value-object value"&gt;{code: 8, parameter: "Patch value not on valid JSON format.", message: "Invalid parameters"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;In a nutshell, here is what I am trying to do. I want to be able to change the pivot table's properties based on user input. Specifically, I want to change one of the dimensions to a completely different field. I am using &lt;A href="https://github.com/qlik-demo-team/qdt-components" target="_blank" rel="noopener"&gt;qdtComponents&lt;/A&gt;&amp;nbsp;to handle the chart's creation and to call setOptions. I think it is important to note that when setOptions is called, the entire properties object is passed as a parameter, so it is effectively patching every property.&lt;/P&gt;&lt;P&gt;I understand that setOptions is essentially a wrapper for applyPatches, and that the specific error I am receiving is from the applyPatches method.&lt;/P&gt;&lt;P&gt;The weird thing is, I am able to successfully accomplish the desired behavior on other chart types. For testing, I made a line chart and a bar chart with the same measures and there is no problem. When setOptions is called, the chart updates with the correct dimension. The error is only happening for the pivot table.&lt;/P&gt;&lt;P&gt;Below is the stringified applyPatches call:&lt;/P&gt;&lt;PRE&gt;{
  "delta": true,
  "handle": 8,
  "method": "ApplyPatches",
  "params": [
    [
      {
        "qPath": "/qInfo/qId",
        "qOp": "add",
        "qValue": "null"
      },
      {
        "qPath": "/qInfo/qType",
        "qOp": "add",
        "qValue": "\"pivot-table\""
      },
      {
        "qPath": "/qExtendsId",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qStateName",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qStateName",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qDimensions",
        "qOp": "add",
        "qValue": "[{\"qLibraryId\":\"\",\"qDef\":{\"qGrouping\":\"N\",\"qFieldDefs\":[\"STUDENT.YEAR\"],\"qFieldLabels\":[\"Year\"],\"qSortCriterias\":[{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":-1,\"qSortByAscii\":1,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0}],\"qNumberPresentations\":[],\"qReverseSort\":false,\"qActiveField\":0,\"qLabelExpression\":\"\",\"autoSort\":false,\"cId\":\"bMyJmm\",\"othersLabel\":\"Others\"},\"qNullSuppression\":true,\"qIncludeElemValue\":false,\"qOtherTotalSpec\":{\"qOtherMode\":\"OTHER_OFF\",\"qOtherCounted\":{\"qv\":\"10\"},\"qOtherLimit\":{\"qv\":\"0\"},\"qOtherLimitMode\":\"OTHER_GE_LIMIT\",\"qSuppressOther\":false,\"qForceBadValueKeeping\":true,\"qApplyEvenWhenPossiblyWrongResult\":true,\"qGlobalOtherGrouping\":false,\"qOtherCollapseInnerDimensions\":false,\"qOtherSortMode\":\"OTHER_SORT_DESCENDING\",\"qTotalMode\":\"TOTAL_OFF\",\"qReferencedExpression\":{\"qv\":\"\"}},\"qShowTotal\":false,\"qShowAll\":false,\"qOtherLabel\":{\"qv\":\"Others\"},\"qTotalLabel\":{\"qv\":\"Totals\"},\"qCalcCond\":{\"qv\":\"\"},\"qAttributeExpressions\":[],\"qAttributeDimensions\":[],\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}},{\"qLibraryId\":\"\",\"qDef\":{\"qGrouping\":\"N\",\"qFieldDefs\":[\"STUDENT.BUILDING_NAME\"],\"qFieldLabels\":[\"Building\"],\"qSortCriterias\":[{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":1,\"qSortByAscii\":1,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0}],\"qNumberPresentations\":[],\"qReverseSort\":false,\"qActiveField\":0,\"qLabelExpression\":\"\",\"autoSort\":true,\"cId\":\"cFRFyMf\",\"othersLabel\":\"Others\"},\"qNullSuppression\":true,\"qIncludeElemValue\":false,\"qOtherTotalSpec\":{\"qOtherMode\":\"OTHER_OFF\",\"qOtherCounted\":{\"qv\":\"10\"},\"qOtherLimit\":{\"qv\":\"0\"},\"qOtherLimitMode\":\"OTHER_GE_LIMIT\",\"qSuppressOther\":false,\"qForceBadValueKeeping\":true,\"qApplyEvenWhenPossiblyWrongResult\":true,\"qGlobalOtherGrouping\":false,\"qOtherCollapseInnerDimensions\":false,\"qOtherSortMode\":\"OTHER_SORT_DESCENDING\",\"qTotalMode\":\"TOTAL_OFF\",\"qReferencedExpression\":{\"qv\":\"\"}},\"qShowTotal\":false,\"qShowAll\":false,\"qOtherLabel\":{\"qv\":\"Others\"},\"qTotalLabel\":{\"qv\":\"Totals\"},\"qCalcCond\":{\"qv\":\"\"},\"qAttributeExpressions\":[],\"qAttributeDimensions\":[],\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}}]"
      },
      {
        "qPath": "/qHyperCubeDef/qMeasures",
        "qOp": "add",
        "qValue": "[{\"qLibraryId\":\"\",\"qDef\":{\"qLabel\":\"Met\",\"qDescription\":\"\",\"qTags\":[],\"qGrouping\":\"N\",\"qDef\":\"\\n                                        =count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL_MET_FLAG = {1}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        ) / \\n                                        count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL_MET_FLAG -= {''}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        )\\n                                    \",\"qNumFormat\":{\"qType\":\"F\",\"qnDec\":2,\"qUseThou\":0,\"qFmt\":\"0.0%\",\"qDec\":\".\",\"qThou\":\",\"},\"qRelative\":false,\"qBrutalSum\":false,\"qAggrFunc\":\"\",\"qAccumulate\":0,\"qReverseSort\":false,\"qActiveExpression\":0,\"qExpressions\":[],\"qLabelExpression\":\"\",\"autoSort\":true,\"cId\":\"LUFKvh\",\"numFormatFromTemplate\":true,\"isCustomFormatted\":false},\"qSortBy\":{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":-1,\"qSortByAscii\":0,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0},\"qAttributeExpressions\":[{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false,\"id\":\"cellBackgroundColor\"},{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false,\"id\":\"cellForegroundColor\"}],\"qAttributeDimensions\":[],\"qCalcCond\":{\"qv\":\"\"},\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}},{\"qLibraryId\":\"\",\"qDef\":{\"qLabel\":\"Not Met\",\"qDescription\":\"\",\"qTags\":[],\"qGrouping\":\"N\",\"qDef\":\"\\n                                        =count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL_MET_FLAG = {0}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        ) / \\n                                        count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL_MET_FLAG -= {''}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        )\\n                                    \",\"qNumFormat\":{\"qType\":\"F\",\"qnDec\":2,\"qUseThou\":0,\"qFmt\":\"0.0%\",\"qDec\":\".\",\"qThou\":\",\"},\"qRelative\":false,\"qBrutalSum\":false,\"qAggrFunc\":\"\",\"qAccumulate\":0,\"qReverseSort\":false,\"qActiveExpression\":0,\"qExpressions\":[],\"qLabelExpression\":\"\",\"autoSort\":true,\"cId\":\"TdWtBs\",\"numFormatFromTemplate\":true,\"isCustomFormatted\":false},\"qSortBy\":{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":-1,\"qSortByAscii\":0,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0},\"qAttributeExpressions\":[{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false},{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false}],\"qAttributeDimensions\":[],\"qCalcCond\":{\"qv\":\"\"},\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}},{\"qLibraryId\":\"\",\"qDef\":{\"qLabel\":\"Not Proficient\",\"qDescription\":\"\",\"qTags\":[],\"qGrouping\":\"N\",\"qDef\":\"\\n                                        =count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL = {2}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        ) / \\n                                        count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL -= {''}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        )\\n                                    \",\"qNumFormat\":{\"qType\":\"F\",\"qnDec\":2,\"qUseThou\":0,\"qFmt\":\"0.0%\",\"qDec\":\".\",\"qThou\":\",\"},\"qRelative\":false,\"qBrutalSum\":false,\"qAggrFunc\":\"\",\"qAccumulate\":0,\"qReverseSort\":false,\"qActiveExpression\":0,\"qExpressions\":[],\"qLabelExpression\":\"\",\"autoSort\":true,\"cId\":\"jrgwPN\",\"numFormatFromTemplate\":true,\"isCustomFormatted\":false},\"qSortBy\":{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":-1,\"qSortByAscii\":0,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0},\"qAttributeExpressions\":[{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false},{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false}],\"qAttributeDimensions\":[],\"qCalcCond\":{\"qv\":\"\"},\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}},{\"qLibraryId\":\"\",\"qDef\":{\"qLabel\":\"Partially Proficient\",\"qDescription\":\"\",\"qTags\":[],\"qGrouping\":\"N\",\"qDef\":\"\\n                                        =count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL = {3}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        ) / \\n                                        count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL -= {''}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        )\\n                                    \",\"qNumFormat\":{\"qType\":\"F\",\"qnDec\":2,\"qUseThou\":0,\"qFmt\":\"0.0%\",\"qDec\":\".\",\"qThou\":\",\"},\"qRelative\":false,\"qBrutalSum\":false,\"qAggrFunc\":\"\",\"qAccumulate\":0,\"qReverseSort\":false,\"qActiveExpression\":0,\"qExpressions\":[],\"qLabelExpression\":\"\",\"autoSort\":true,\"cId\":\"nfRShs\",\"numFormatFromTemplate\":true,\"isCustomFormatted\":false},\"qSortBy\":{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":-1,\"qSortByAscii\":0,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0},\"qAttributeExpressions\":[{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false},{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false}],\"qAttributeDimensions\":[],\"qCalcCond\":{\"qv\":\"\"},\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}},{\"qLibraryId\":\"\",\"qDef\":{\"qLabel\":\"Proficient\",\"qDescription\":\"\",\"qTags\":[],\"qGrouping\":\"N\",\"qDef\":\"\\n                                        =count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL = {4}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        ) / \\n                                        count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL -= {''}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        )\\n                                    \",\"qNumFormat\":{\"qType\":\"F\",\"qnDec\":2,\"qUseThou\":0,\"qFmt\":\"0.0%\",\"qDec\":\".\",\"qThou\":\",\"},\"qRelative\":false,\"qBrutalSum\":false,\"qAggrFunc\":\"\",\"qAccumulate\":0,\"qReverseSort\":false,\"qActiveExpression\":0,\"qExpressions\":[],\"qLabelExpression\":\"\",\"autoSort\":true,\"cId\":\"AjvzmM\",\"numFormatFromTemplate\":true,\"isCustomFormatted\":false},\"qSortBy\":{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":-1,\"qSortByAscii\":0,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0},\"qAttributeExpressions\":[{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false},{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false}],\"qAttributeDimensions\":[],\"qCalcCond\":{\"qv\":\"\"},\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}},{\"qLibraryId\":\"\",\"qDef\":{\"qLabel\":\"Advanced\",\"qDescription\":\"\",\"qTags\":[],\"qGrouping\":\"N\",\"qDef\":\"\\n                                        =count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL = {5}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        ) / \\n                                        count({$&amp;lt;\\n                                            ASSESSMENT_LINK.TEST_NAME = {'MSTEP'},\\n                                            ASSESSMENT_RESULTS.PERFORMANCE_LEVEL -= {''}\\n                                            &amp;gt;} DISTINCT ASSESSMENT_RESULT_YEAR_HKEY\\n                                        )\\n                                    \",\"qNumFormat\":{\"qType\":\"F\",\"qnDec\":2,\"qUseThou\":0,\"qFmt\":\"0.0%\",\"qDec\":\".\",\"qThou\":\",\"},\"qRelative\":false,\"qBrutalSum\":false,\"qAggrFunc\":\"\",\"qAccumulate\":0,\"qReverseSort\":false,\"qActiveExpression\":0,\"qExpressions\":[],\"qLabelExpression\":\"\",\"autoSort\":true,\"cId\":\"fkXEQK\",\"numFormatFromTemplate\":true,\"isCustomFormatted\":false},\"qSortBy\":{\"qSortByState\":0,\"qSortByFrequency\":0,\"qSortByNumeric\":-1,\"qSortByAscii\":0,\"qSortByLoadOrder\":1,\"qSortByExpression\":0,\"qExpression\":{\"qv\":\"\"},\"qSortByGreyness\":0},\"qAttributeExpressions\":[{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false},{\"qExpression\":\"\",\"qLibraryId\":\"\",\"qAttribute\":false}],\"qAttributeDimensions\":[],\"qCalcCond\":{\"qv\":\"\"},\"qCalcCondition\":{\"qCond\":{\"qv\":\"\"},\"qMsg\":{\"qv\":\"\"}}}]"
      },
      {
        "qPath": "/qHyperCubeDef/qInterColumnSortOrder",
        "qOp": "add",
        "qValue": "[0,1,-1]"
      },
      {
        "qPath": "/qHyperCubeDef/qSuppressZero",
        "qOp": "add",
        "qValue": "true"
      },
      {
        "qPath": "/qHyperCubeDef/qSuppressMissing",
        "qOp": "add",
        "qValue": "true"
      },
      {
        "qPath": "/qHyperCubeDef/qInitialDataFetch",
        "qOp": "add",
        "qValue": "[{\"qLeft\":0,\"qTop\":0,\"qWidth\":50,\"qHeight\":50}]"
      },
      {
        "qPath": "/qHyperCubeDef/qReductionMode",
        "qOp": "add",
        "qValue": "\"N\""
      },
      {
        "qPath": "/qHyperCubeDef/qMode",
        "qOp": "add",
        "qValue": "\"P\""
      },
      {
        "qPath": "/qHyperCubeDef/qPseudoDimPos",
        "qOp": "add",
        "qValue": "-1"
      },
      {
        "qPath": "/qHyperCubeDef/qNoOfLeftDims",
        "qOp": "add",
        "qValue": "2"
      },
      {
        "qPath": "/qHyperCubeDef/qAlwaysFullyExpanded",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qMaxStackedCells",
        "qOp": "add",
        "qValue": "5000"
      },
      {
        "qPath": "/qHyperCubeDef/qPopulateMissing",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qShowTotalsAbove",
        "qOp": "add",
        "qValue": "true"
      },
      {
        "qPath": "/qHyperCubeDef/qIndentMode",
        "qOp": "add",
        "qValue": "true"
      },
      {
        "qPath": "/qHyperCubeDef/qCalcCond/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qSortbyYValue",
        "qOp": "add",
        "qValue": "0"
      },
      {
        "qPath": "/qHyperCubeDef/qTitle/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qCalcCondition/qCond/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qCalcCondition/qMsg/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qColumnOrder",
        "qOp": "add",
        "qValue": "[]"
      },
      {
        "qPath": "/qHyperCubeDef/columnWidths",
        "qOp": "add",
        "qValue": "[]"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qStateName",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qDimensions",
        "qOp": "add",
        "qValue": "[]"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qMeasures",
        "qOp": "add",
        "qValue": "[]"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qInterColumnSortOrder",
        "qOp": "add",
        "qValue": "[]"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qSuppressZero",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qSuppressMissing",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qInitialDataFetch",
        "qOp": "add",
        "qValue": "[]"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qReductionMode",
        "qOp": "add",
        "qValue": "\"N\""
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qMode",
        "qOp": "add",
        "qValue": "\"S\""
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qPseudoDimPos",
        "qOp": "add",
        "qValue": "-1"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qNoOfLeftDims",
        "qOp": "add",
        "qValue": "-1"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qAlwaysFullyExpanded",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qMaxStackedCells",
        "qOp": "add",
        "qValue": "5000"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qPopulateMissing",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qShowTotalsAbove",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qIndentMode",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qCalcCond/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qSortbyYValue",
        "qOp": "add",
        "qValue": "0"
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qTitle/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qCalcCondition/qCond/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qCalcCondition/qMsg/qv",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/qHyperCubeDef/qLayoutExclude/qHyperCubeDef/qColumnOrder",
        "qOp": "add",
        "qValue": "[]"
      },
      {
        "qPath": "/showTitles",
        "qOp": "add",
        "qValue": "true"
      },
      {
        "qPath": "/title",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/subtitle",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/footnote",
        "qOp": "add",
        "qValue": "\"\""
      },
      {
        "qPath": "/showDetails",
        "qOp": "add",
        "qValue": "false"
      },
      {
        "qPath": "/visualization",
        "qOp": "add",
        "qValue": "\"pivot-table\""
      }
    ],
    true
  ],
  "id": 20,
  "jsonrpc": "2.0"
}&lt;/PRE&gt;&lt;P&gt;And this is the response:&lt;/P&gt;&lt;PRE&gt;{
  "jsonrpc": "2.0",
  "id": 20,
  "error": {
    "code": 8,
    "parameter": "Patch value not on valid JSON format.",
    "message": "Invalid parameters"
  }
}&lt;/PRE&gt;&lt;P&gt;Any help would be greatly appreciated&amp;nbsp;&lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://10.236.58.52/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 21:19:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550020#M10073</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2024-11-16T21:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: setOptions not working for pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550028#M10074</link>
      <description>&lt;P&gt;Try removing the very first valde, /qInfo/qId. You shouldn’t patch the qId.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Feb 2019 17:42:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550028#M10074</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2019-02-27T17:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: setOptions not working for pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550054#M10075</link>
      <description>I tried it. Still receiving the same error.</description>
      <pubDate>Wed, 27 Feb 2019 18:43:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550054#M10075</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2019-02-27T18:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: setOptions not working for pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550239#M10079</link>
      <description>&lt;P&gt;Well, then there is something else in your patch array that is wrong. Perhaps you should try just patching the stuff you actually wannt to change, like dimensions? Or at least skip the qLayoutExclude stuff, that's just a way for the client to save stuff when you convert visualizations.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 06:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550239#M10079</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2019-02-28T06:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: setOptions not working for pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550673#M10090</link>
      <description>&lt;P&gt;Got it! It looks like the qLayoutExclude was the problem. Once I removed that from the def it began working like a charm. The only reason that I had that in my chart properties was because it was what I got from the developer menu in the app.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much Erik, I've been trying to figure this out for the past few days.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 17:44:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1550673#M10090</guid>
      <dc:creator>dselgo_eidex</dc:creator>
      <dc:date>2019-02-28T17:44:12Z</dc:date>
    </item>
    <item>
      <title>Re: setOptions not working for pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1577942#M10488</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/1222"&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"&gt;@ErikWetterberg&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;A href="https://github.com/erikwett/QonnectionsMashup" target="_blank" rel="noopener"&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"&gt;@ErikWetterberg&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 12:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1577942#M10488</guid>
      <dc:creator>nitinsaivishnu1</dc:creator>
      <dc:date>2019-05-08T12:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: setOptions not working for pivot table</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1577952#M10489</link>
      <description>&lt;P&gt;Please don't post new questions on old threads.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 13:14:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/setOptions-not-working-for-pivot-table/m-p/1577952#M10489</guid>
      <dc:creator>ErikWetterberg</dc:creator>
      <dc:date>2019-05-08T13:14:33Z</dc:date>
    </item>
  </channel>
</rss>

