GetCalculation
Retrieves detailed information about a specific calculation
The GetCalculation query retrieves detailed information about a specific calculation in a CalcTree workspace, including its statements, formulas, and values
This query allows you to fetch the details of a calculation by specifying:
The workspace where the calculation is stored
The calculation itself
A specific revision of the calculation
It returns the calculation’s ID along with all statements and their associated properties.
Input Parameters
workspaceId
ID!
Yes
The unique ID of the CalcTree workspace
calculationId
ID!
Yes
The unique ID of the calculation
revisionId
ID!
Yes
The unique ID of the revision to retrieve
Sample Query
Sample Header
Sample Variables
Sample Response
Description of Returned Fields
calculationId
String
The unique ID of the retrieved calculation.
statements
Array
An array of statements included in the calculation.
statementId
String
The unique ID of the statement.
title
String
The title of the statement, in the platform UI this is referred to as 'Display Name'.
engine
String
The execution engine used for the statement (e.g., Python).
formula
String
The formula used in the statement, this shows the 'Name' = 'Formula' as per these fields in the UI.
namedValues
Array of Objects
An array of name-value pairs representing variables used in the formula.
name
String
This shows the Name of a particular statement.
value
Number
The current result value of a particular statement.
Usage Example
Here’s how to use this query with an example in Python:
Tips for Using the Query
Ensure your
workspaceId
,calculationId
, andrevisionId
are correct.Unless working with a specific revision, set
revisionID
toffffffff
to access the latest version of the calculation.Use the
namedValues
array to understand name and values of a particular statement.
Last updated