getValues

This function allows you to call to another report, calculate it in the background without rendering it to the user and return the values from a given range.

Syntax

getValues (range, calculationId )

Arguments

range

(Required)

The range to return. This can be any of the following:

  • A1 reference
  • R1C1 reference
  • A1:B6 reference
  • Named range

calculationId

If empty, this will get the range values being asked for from the current reports last calculation

If an id is specified, then it will use the results from that calclation.

Return

The result of this function is a JavaScript string array of values in the following format:

[ 
  "123",
  "Hello",
  "$123.00"
]

Examples

//
// Example 1 - Retrieve the values from range A1 from the current reports last calculation
//
var values1 = report.api.getValues("A1"); 

//
// Example 2 - Retrieve the values from range A1:B3 from the current reports last calculation
//
var values2 = report.api.getValues("A1:B3");

//
// Example 3 - Retrieve the values from  range A1:B3 from the calculationId 1232
//
var values3 = report.api.getValues("A1:B3", 1232);