getSumForCustomVariable(customVariable, filter, onSuccess)

Description

This function will help you to fetch the total responses for a specific custom variable.Note: This function is an async function and doesn't return any value. The value can be fetched through onSuccess function as below
getSumForCustomVariable(customVariable , filter, function(value) {
//You will get the value here, so write your code here
})


Example:

  • getSumForCustomVariable(‘custom3’, {}, function(value) {})
  • getSumForCustomVariable(‘custom3’, {segmentCode: [‘S1’, ‘S2’]}, function(value) {})
  • getSumForCustomVariable(‘custom3’, {product: [‘p1’, ‘p2’]}, function(value) {})
  • getSumForCustomVariable(‘customMapped3’, {productGroup: [‘pg1’, ‘pg2’]}, function(value) {})
  • getSumForCustomVariable(‘custom3’, {isCompleted: ‘true’}, function(value) {})
  • getSumForCustomVariable(‘custom3’, {questionID: [123, 234,345,456]}, function(value) {})
  • getSumForCustomVariable(‘custom3’, {customVariables: [{‘custom1’ :[‘v1’, ‘v2’]}, {‘custom40’: [‘v3’, ‘v4’]}]}, function(value) {})
  • getSumForCustomVariable(‘customMapped3’, {dateRange: {start : ‘10/20/2021’, end : ‘04/30/2021’}}, function(value) {})


Refer to Filters for more information