Category / Section
How to pass query string in service method settings?
1 min read
This KB document explains how to pass the query string in service method settings.
Solution:
You can pass the query string along with service methods through service method settings to pivot controls. Follow the below steps to achieve this requirement.
Step 1:
Add the query string URL in the “serviceMethodSettings” API of pivot controls.
JavaScript
<script type="text/javascript">
var queryString = "?q=123";
//Set properties and initialize ejPivotClient widget.
$(function () {
$("#PivotClient1").ejPivotClient(
{
url: "/Relational",
renderSuccess: "successEvent",
serviceMethodSettings: {
//Here you need to specify Service method name + queryString
initialize: "InitializeClient" + queryString,
filterElement: "Filtering" + queryString,
nodeDropped: "NodeDropped" + queryString,
toggleAxis: "ToggleAxis" + queryString,
fetchMemberTreeNodes: "FetchMembers" + queryString,
toolbarServices: "ToolbarOperations" + queryString,
exportPivotClient: "Export" + queryString,
valueSorting: "ValueSorting" + queryString,
},
title: "Relational Browser",
customObject: {Language: "en-US"}
});
});
Step 2:
In the “renderSuccess” event, specify the query string URL for the methods such as DrillChart, FetchMembers, and FilterElement.
function successEvent(args) {
//Here you can change PivotChart and PivotSchemadesigner method names
this._pivotChart.model.serviceMethodSettings.drillDown ="DrillChart" + queryString;
this._schemaData.model.serviceMethods.fetchMembers ="FetchMembers" + queryString;
this._schemaData.model.serviceMethods.filtering ="Filtering" + queryString;
}