Published at: 2026-09-17

Report and chart functions


1.1 Load the first 20 records of chart data by default: Fx.BI.loadViewData()

1.1.1 Purpose

Query chart data by viewId.

1.1.2 Parameters

Parameter Type Required Description Example
viewId String Yes Chart ID <pre>“BI_62174baf180c0b000183a7a6”</pre>

1.1.3 Return values

Parameter Type Description
code Int Function status code. 200: success. 403: no permission. 500: system error.
message String Returned message
page Object Pagination information
displayFields Object Header information
dataSet Object Result data set

1.1.4 Return value example

Chart data is returned in a unified two-dimensional table structure. The header and the data set are returned separately and map to each other in pairs.
{
  "code": 200,
  "message": "success",
  "i18nCode": null,
  "data": {
    "page": {
      "pageSize": 20,
      "pageNumber": 1,
      "pageCount": 1,
      "totalCount": 3
    },
    "displayFields": [
      {
        "fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4",
        "fieldName": "Account Name",
        "formatStr": null,
        "apiName": "name",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_name$0"
      },
      {
        "fieldId": "BI_0e3221e80e82809cb750316a81fb8bec",
        "fieldName": "Created By",
        "formatStr": "",
        "apiName": "created_by",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_created_by$0"
      },
      {
        "fieldId": "BI_bacc9e515603edf1e4d765fe3970a043",
        "fieldName": "Account No.",
        "formatStr": null,
        "apiName": "account_no",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_account_no$0"
      },
      {
        "fieldId": "BI_39346e9a9deba83f255db6867dea0f4e",
        "fieldName": "Created On",
        "formatStr": "yyyy-MM-dd HH:mm",
        "apiName": "create_time",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_create_time$0"
      },
      {
        "fieldId": "BI_92f9670f6a4ed14d17cebabf8501c4f9",
        "fieldName": "Last Modified By",
        "formatStr": "",
        "apiName": "last_modified_by",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_last_modified_by$0"
      },
      {
        "fieldId": "BI_86142383c45f86fa2be8c6884dce6eeb",
        "fieldName": "Account Hierarchy",
        "formatStr": "",
        "apiName": "account_path",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_account_path$0"
      },
      {
        "fieldId": "BI_2fa0b164273097ce020c607c71b28dc8",
        "fieldName": "Account Industry",
        "formatStr": "",
        "apiName": "field_IGh6L__c",
        "objectDescribeApiName": "AccountObj",
        "columnName": "customer_udef_field_igh6l__c$0"
      },
      {
        "fieldId": "BI_49ccf044b0b6b9b720da8006f37b8474",
        "fieldName": "Payment Arrival Date",
        "formatStr": "yyyy-MM-dd",
        "apiName": "field_rewsS__c",
        "objectDescribeApiName": "AccountObj",
        "columnName": "customer_udef_field_rewss__c$0"
      },
      {
        "fieldId": "BI_4865460605f3905d910d1bffa401a426",
        "fieldName": "value0",
        "formatStr": "",
        "apiName": "value0",
        "objectDescribeApiName": "AccountObj",
        "columnName": "customer_udef_value0$0"
      }
    ],
    "dataSet": [
      [
        {
          "value": "jjjj",
          "formattedValue": "jjjj",
          "formattedShowValue": "jjjj"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1.64610619939E12",
          "formattedValue": "2022-03-01 11:43",
          "formattedShowValue": "1.64610619939E12"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1646841600000",
          "formattedValue": "2022-03-10",
          "formattedShowValue": "1646841600000"
        },
        {
          "value": "621d9656a5db41000156aae0",
          "formattedValue": "621d9656a5db41000156aae0",
          "formattedShowValue": "621d9656a5db41000156aae0"
        }
      ],
      [
        {
          "value": "Test Account",
          "formattedValue": "Test Account",
          "formattedShowValue": "Test Account"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1.646135527393E12",
          "formattedValue": "2022-03-01 19:52",
          "formattedShowValue": "1.646135527393E12"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1646496000000",
          "formattedValue": "2022-03-06",
          "formattedShowValue": "1646496000000"
        },
        {
          "value": "621e08e6a5db4100016247ec",
          "formattedValue": "621e08e6a5db4100016247ec",
          "formattedShowValue": "621e08e6a5db4100016247ec"
        }
      ],
      [
        {
          "value": "Expense Reimbursement User 1",
          "formattedValue": "Expense Reimbursement User 1",
          "formattedShowValue": "Expense Reimbursement User 1"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "1",
          "formattedValue": "1",
          "formattedShowValue": "1"
        },
        {
          "value": "1.645172412386E12",
          "formattedValue": "2022-02-18 16:20",
          "formattedShowValue": "1.645172412386E12"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174",
          "formattedValue": "Expense Reimbursement Upper-Level Account/Expense Reimbursement User 1",
          "formattedShowValue": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1645113600000",
          "formattedValue": "2022-02-18",
          "formattedShowValue": "1645113600000"
        },
        {
          "value": "620f56bccb42760001e9d174",
          "formattedValue": "620f56bccb42760001e9d174",
          "formattedShowValue": "620f56bccb42760001e9d174"
        }
      ]
    ]
  }
}

1.1.5 Report header information and report data display

Screenshot: bi access functions guide
Screenshot: bi access functions guide
Screenshot: bi access functions guide
Report header field reference
Field Meaning Sample return value
objectDescribeApiName PaaS object describe <pre>"objectDescribeApiName": "AccountObj"</pre>
formatStr Formatting information <pre>"formatStr": null</pre>
fieldName Field display name <pre>"fieldName": "Account Name"</pre>
fieldID Field primary key <pre>"fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4"</pre>
columName Unique column name <pre>"columnName": "biz_account_name$0"</pre>
apiName PaaS field describe <pre>"apiName": "name"</pre>
Report data detail field reference
Field Meaning Sample return value
value Field value <pre>"value": "jjjj"</pre>
formattedValue Field display name <pre>"formattedValue": "jjjj"</pre>
formattedShowValue Hover value <pre>"formattedShowValue": "jjjj"</pre>

1.1.6 Function DEMO1

/***Load chart data********/
+++++++++++++++++++++++++++++++++++++++++++++++++Fx.BI.getFiltersResult(<String viewId>)method+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
===================================================================================================================================================================
def(isError4,data4,errorMsg4) = Fx.BI.loadViewData("BI_62174baf180c0b000183a7a6")
if(!isError4){
  def page = data4["page"]
  log.info("Page 1 data set: "+data4["dataSet"])

====================================================================================================================================================================
+++++++++++To query all data sets, combine this with the Fx.BI.pageLoadViewData(<String viewId>,<Integer pageNumber>,<Integer pageSize>)method, using the code in both parts+++++++++++++++++++++
====================================================================================================================================================================

  if(page!=null){
  def pageCount = page["pageCount"] as Integer
  def pageSize = page["pageSize"] as Integer
  if(pageCount>1){
    Range range = Ranges.of(2,pageCount.intValue())
  range.each { i ->
    def (isErrorTmp,dataTmp,errorMsgTmp) = Fx.BI.pageLoadViewData("BI_62174baf180c0b000183a7a6",i,pageSize)
    log.info("Page "+i+" data set: "+dataTmp["dataSet"])
    /*Once you have the DataSet, you can process it in your own business logic*/
  }
  }
  }
}

1.2 Load chart data of page i: Fx.BI.pageLoadViewData(,,)

1.2.1 Purpose

Query chart data of page i.
Note: When the total page count is known, this function queries the data set of each page. It typically works with the following method to retrieve the data sets of all pages. For details, see code DEMO1.
Fx.BI.loadViewData(<String viewId>)

1.2.2 Parameters

Parameter Type Required Description Example
viewId String Yes Chart ID <pre>“BI_62174baf180c0b000183a7a6”</pre>
pageNumber Integer Yes Page number 1
pageSize Integer Yes Records per page 20

1.2.3 Return values

Parameter Type Description
code Int Function status code. 200: success. 403: no permission. 500: system error.
message String Returned message
page Object Pagination information
displayFields Object Header information
dataSet Object Result data set

1.2.4 Return value example

Chart data is returned in a unified two-dimensional table structure. The header and the data set are returned separately and map to each other in pairs.
{
  "code": 200,
  "message": "success",
  "i18nCode": null,
  "data": {
    "page": {
      "pageSize": 20,
      "pageNumber": 1,
      "pageCount": 1,
      "totalCount": 3
    },
    "displayFields": [
      {
        "fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4",
        "fieldName": "Account Name",
        "formatStr": null,
        "apiName": "name",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_name$0"
      },
      {
        "fieldId": "BI_0e3221e80e82809cb750316a81fb8bec",
        "fieldName": "Created By",
        "formatStr": "",
        "apiName": "created_by",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_created_by$0"
      },
      {
        "fieldId": "BI_bacc9e515603edf1e4d765fe3970a043",
        "fieldName": "Account No.",
        "formatStr": null,
        "apiName": "account_no",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_account_no$0"
      },
      {
        "fieldId": "BI_39346e9a9deba83f255db6867dea0f4e",
        "fieldName": "Created On",
        "formatStr": "yyyy-MM-dd HH:mm",
        "apiName": "create_time",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_create_time$0"
      },
      {
        "fieldId": "BI_92f9670f6a4ed14d17cebabf8501c4f9",
        "fieldName": "Last Modified By",
        "formatStr": "",
        "apiName": "last_modified_by",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_last_modified_by$0"
      },
      {
        "fieldId": "BI_86142383c45f86fa2be8c6884dce6eeb",
        "fieldName": "Account Hierarchy",
        "formatStr": "",
        "apiName": "account_path",
        "objectDescribeApiName": "AccountObj",
        "columnName": "biz_account_account_path$0"
      },
      {
        "fieldId": "BI_2fa0b164273097ce020c607c71b28dc8",
        "fieldName": "Account Industry",
        "formatStr": "",
        "apiName": "field_IGh6L__c",
        "objectDescribeApiName": "AccountObj",
        "columnName": "customer_udef_field_igh6l__c$0"
      },
      {
        "fieldId": "BI_49ccf044b0b6b9b720da8006f37b8474",
        "fieldName": "Payment Arrival Date",
        "formatStr": "yyyy-MM-dd",
        "apiName": "field_rewsS__c",
        "objectDescribeApiName": "AccountObj",
        "columnName": "customer_udef_field_rewss__c$0"
      },
      {
        "fieldId": "BI_4865460605f3905d910d1bffa401a426",
        "fieldName": "value0",
        "formatStr": "",
        "apiName": "value0",
        "objectDescribeApiName": "AccountObj",
        "columnName": "customer_udef_value0$0"
      }
    ],
    "dataSet": [
      [
        {
          "value": "jjjj",
          "formattedValue": "jjjj",
          "formattedShowValue": "jjjj"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1.64610619939E12",
          "formattedValue": "2022-03-01 11:43",
          "formattedShowValue": "1.64610619939E12"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1646841600000",
          "formattedValue": "2022-03-10",
          "formattedShowValue": "1646841600000"
        },
        {
          "value": "621d9656a5db41000156aae0",
          "formattedValue": "621d9656a5db41000156aae0",
          "formattedShowValue": "621d9656a5db41000156aae0"
        }
      ],
      [
        {
          "value": "Test Account",
          "formattedValue": "Test Account",
          "formattedShowValue": "Test Account"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1.646135527393E12",
          "formattedValue": "2022-03-01 19:52",
          "formattedShowValue": "1.646135527393E12"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1646496000000",
          "formattedValue": "2022-03-06",
          "formattedShowValue": "1646496000000"
        },
        {
          "value": "621e08e6a5db4100016247ec",
          "formattedValue": "621e08e6a5db4100016247ec",
          "formattedShowValue": "621e08e6a5db4100016247ec"
        }
      ],
      [
        {
          "value": "Expense Reimbursement User 1",
          "formattedValue": "Expense Reimbursement User 1",
          "formattedShowValue": "Expense Reimbursement User 1"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "1",
          "formattedValue": "1",
          "formattedShowValue": "1"
        },
        {
          "value": "1.645172412386E12",
          "formattedValue": "2022-02-18 16:20",
          "formattedShowValue": "1.645172412386E12"
        },
        {
          "value": "1067",
          "formattedValue": "bi",
          "formattedShowValue": "1067"
        },
        {
          "value": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174",
          "formattedValue": "Expense Reimbursement Upper-Level Account/Expense Reimbursement User 1",
          "formattedShowValue": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174"
        },
        {
          "value": "null",
          "formattedValue": "--",
          "formattedShowValue": null
        },
        {
          "value": "1645113600000",
          "formattedValue": "2022-02-18",
          "formattedShowValue": "1645113600000"
        },
        {
          "value": "620f56bccb42760001e9d174",
          "formattedValue": "620f56bccb42760001e9d174",
          "formattedShowValue": "620f56bccb42760001e9d174"
        }
      ]
    ]
  }
}

1.2.5 Report header information and report data display

Screenshot: bi access functions guide
Screenshot: bi access functions guide
Screenshot: bi access functions guide
Report header field reference
Field Meaning Sample return value
fieldID Field primary key <pre>"fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4"</pre>
fieldName Field display name <pre>"fieldName": "Account Name"</pre>
formatStr Formatting information <pre>"formatStr": null </pre>
apiName PaaS field describe <pre>"apiName": "name"</pre>
objectDescribeApiName PaaS object describe <pre>"objectDescribeApiName": "AccountObj"</pre>
columName Unique column name <pre>"columnName": "biz_account_name$0"</pre>
Report data detail field reference
Field Meaning Sample return value
value Field value <pre>"value": "jjjj"</pre>
formattedValue Field display name <pre>"formattedValue": "jjjj"</pre>
formattedShowValue Hover value <pre>"formattedShowValue": "jjjj"</pre>

1.2.6 Function DEMO2

/**Query the data set of page i**/
+++++++++++++++++++++Fx.BI.pageLoadViewData(<String viewId>,<Integer pageNumber>,<Integer pageSize>)method++++++++++++++++++++++++++++++
======================================================================================================================================
    def (isErrorTmp,dataTmp,errorMsgTmp) = Fx.BI.pageLoadViewData("BI_62174baf180c0b000183a7a6",i,pageSize)
    log.info("Page "+i+" data set: "+dataTmp["dataSet"])
    /*Once you have the DataSet, you can process it in your own business logic*/

1.3 Query chart data with conditions (returns the first 20 records by default): Fx.BI.queryViewData(,,)

1.3.1 Purpose

Note: This function can query only one page of data. To query all data, combine it with the following function. See the sample code below.
Fx.BI.pageQueryViewData(<String viewId>,<Integer pageNum>,<Integer pageSize>,<String defaultFilterOptionID>,<List filters>)

1.3.2 Parameters

Parameter Type Required Description Example
viewId String Yes Chart ID <pre>“BI_62174baf180c0b000183a7a6”</pre>
defaultFilterOptionID String Yes Scenario ID <pre>“BI_59a3e59333b39e09b44e9db1”</pre>
filters List No Filter conditions (including data range and scenario filters) <pre>["filterId":"BI_62174baf180c0b000183a7aa","dataRangeId":"6"]</pre>

1.3.3 Return values

Parameter Type Description
code Int Function status code. 200: success. 403: no permission. 500: system error.
message String Returned message
page Object Pagination information
displayFields Object Header information
dataSet Object Result data set

1.3.4 Return value example

Chart data is returned in a unified two-dimensional table structure. The header and the data set are returned separately and map to each other in pairs.
{
"code": 200,
"message": "success",
"i18nCode": null,
"data": {
"page": {
"pageSize": 20,
"pageNumber": 20,
"pageCount": 1,
"totalCount": 2
},
"displayFields": [
{
"fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4",
"fieldName": "Account Name",
"apiName": "name",
"objectDescribeApiName": "AccountObj",
"columnName": "biz_account_name$0"
},
{
"fieldId": "BI_bacc9e515603edf1e4d765fe3970a043",
"fieldName": "Account No.",
"apiName": "account_no",
"objectDescribeApiName": "AccountObj",
"columnName": "biz_account_account_no$0"
}
],
"dataSet": [
[
{
"value": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174",
"formattedValue": "Expense Reimbursement Upper-Level Account/Expense Reimbursement User 1",
"formattedShowValue": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174"
},
{
"value": "1645113600000",
"formattedValue": "2022-02-18",
"formattedShowValue": "1645113600000"
}
]
]
}
}
Report header field reference
Field Meaning Sample return value
fieldID Field primary key <pre>"fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4"</pre>
fieldName Field display name <pre>"fieldName": "Account Name"</pre>
apiName PaaS field describe <pre>"apiName": "name"</pre>
objectDescribeApiName PaaS object describe <pre>"objectDescribeApiName": "AccountObj"</pre>
columName Unique column name <pre>"columnName": "biz_account_name$0"</pre>
Report data detail field reference
Field Meaning Sample return value
value Field value <pre>"value": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174", </pre>
formattedValue Field display name <pre>"formattedValue": "Expense Reimbursement Upper-Level Account/Expense Reimbursement User 1",</pre>
formattedShowValue Hover value <pre>"formattedShowValue": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174"</pre>

1.3.5 Function DEMO3

/**Conditional query*/
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++Fx.BI.queryViewData(<String viewId>,<String optionId>,<List filters>)method. Query data in the table by conditions (only one page of data can be queried)++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
======================================================================================================================================================================================================

List filters = [["filterId":"BI_62174baf180c0b000183a7aa","dateRangeId":"6"]]
def(isError6,data6,errorMsg6) = Fx.BI.queryViewData("BI_62174baf180c0b000183a7a6","BI_59a3e59333b39e09b44e9db1",filters)
if(!isError6){
  def page6 = data6["page"]
  log.info("Page 1 data set: "+data6["dataSet"])

======================================================================================================================================================================================================
++++++++++++++++++++++++++++++To query all data, combine this with the Fx.BI.pageQueryViewData(<String viewId>,<Integer pageNumber>,<Integer pageSize>,<String defaultFilterOptionID>,<List filters>)method below+++++++++++++++++++++++++++++++++++++++++++++++
======================================================================================================================================================================================================
  if(page6!=null){
  def pageCount6 = page6["pageCount"] as Integer
  def pageSize6 = page6["pageSize"] as Integer
  if(pageCount6>1){
    Range range6 = Ranges.of(2,pageCount6.intValue())
  range6.each { i ->
    def (isErrorTmp,dataTmp,errorMsgTmp) = Fx.BI.pageQueryViewData("BI_62174baf180c0b000183a7a6",i,pageSize6,"BI_59a3e59333b39e09b44e9db1",filters)
    log.info("Page "+i+" data set: "+dataTmp["dataSet"])
    /*Once you have the DataSet, you can process it in your own business logic*/
  }
  }
  }
}else{
  log.info("Conditional query failed: "+errorMsg6)
}

1.4 Query the data set of page i with conditions: Fx.BI.pageQueryViewData(,,,,)

1.4.1 Purpose

Query chart data with the specified conditions and page number.
Note: When the total page count is known, this function queries the data set of each page. It typically works with the following method to retrieve the data sets of all pages. For details, see code DEMO3.
Fx.BI.queryViewData(<String viewId>,<String defaultFilterOptionID>,<List filters>)

1.4.2 Parameters

Parameter Type Required Description
viewId String Yes Chart ID
pageNumber Integer Yes Page number
pageSize Integer Yes Records per page
defaultFilterOptionID String Yes Permission scenario
filters List Yes Filter conditions

1.4.3 Return values

Parameter Type Description
code Int Function status code. 200: success. 403: no permission. 500: system error.
message String Returned message
page Object Pagination information
displayFields Object Header information
dataSet Object Result data set

1.4.4 Return value example

Chart data is returned in a unified two-dimensional table structure. The header and the data set are returned separately and map to each other in pairs.
{
"code": 200,
"message": "success",
"i18nCode": null,
"data": {
"page": {
"pageSize": 20,
"pageNumber": 20,
"pageCount": 1,
"totalCount": 2
},
"displayFields": [
{
"fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4",
"fieldName": "Account Name",
"apiName": "name",
"objectDescribeApiName": "AccountObj",
"columnName": "biz_account_name$0"
},
{
"fieldId": "BI_bacc9e515603edf1e4d765fe3970a043",
"fieldName": "Account No.",
"apiName": "account_no",
"objectDescribeApiName": "AccountObj",
"columnName": "biz_account_account_no$0"
}
],
"dataSet": [
[
{
"value": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174",
"formattedValue": "Expense Reimbursement Upper-Level Account/Expense Reimbursement User 1",
"formattedShowValue": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174"
},
{
"value": "1645113600000",
"formattedValue": "2022-02-18",
"formattedShowValue": "1645113600000"
}
]
]
}
}
Report header field reference
Field Meaning Sample return value
fieldID Field primary key <pre>"fieldId": "BI_b76b2e080ba679a4d609be4149fa0cf4" </pre>
fieldName Field display name <pre>"fieldName": "Account Name" </pre>
apiName PaaS field describe <pre>"apiName": "name" </pre>
objectDescribeApiName PaaS object describe <pre>"objectDescribeApiName": "AccountObj" </pre>
columName Unique column name <pre>"columnName": "biz_account_name$0" </pre>
Report data detail field reference
Field Meaning Sample return value
value Field value <pre>"value": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174", </pre>
formattedValue Field display name <pre>"formattedValue": "Expense Reimbursement Upper-Level Account/Expense Reimbursement User 1",</pre>
formattedShowValue Hover value <pre>"formattedShowValue": "620f56eacb42760001e9d6c1.620f56bccb42760001e9d174" </pre>

1.4.5 Function DEMO4

======================================================================================================================================================================================================
+++++++++++++++++++++++++++++++++++++++++++++++++Fx.BI.pageQueryViewData(<String viewId>,<Integer pageNumber>,<Integer pageSize>,<String defaultFilterOptionID>,<List filters>)method++++++++++++++++++++++++++++++++++++++++++++++++++++++++
======================================================================================================================================================================================================
 /**Query the chart data set of page i with conditions*/
def (isErrorTmp,dataTmp,errorMsgTmp) = Fx.BI.pageQueryViewData("BI_62174baf180c0b000183a7a6",i,pageSize6,"BI_59a3e59333b39e09b44e9db1",filters)
    log.info("Page "+i+" data set: "+dataTmp["dataSet"])
    /*Once you have the DataSet, you can process it in your own business logic*/

1.5 Get the data ranges and scenarios of a chart: Fx.BI.getFiltersResult()

1.5.1 Purpose

Query the data ranges and scenarios of a chart with the specified conditions.

1.5.2 Parameters

Parameter Type Required Description
viewId String Yes Chart ID

1.5.3 Return values

Parameter Type Description
code Int Function status code. 200: success. 403: no permission. 404: not found. 500: system error.
message String Returned message
filterGroups Object Data range information
labelAndOptions Object Scenario information

1.5.4 Return value example

Chart data is returned in a unified two-dimensional table structure. The header and the data set are returned separately and map to each other in pairs.
{
  "code": 200,
  "message": "success",
  "i18nCode": null,
  "data": {
    "filterGroups": [
      {
        "filters": [
          {
            "filterId": "BI_62174baf180c0b000183a7a9",
            "value1": "[{"id":999999,"type":"c"}]",
            "value2": "",
            "dateRangeId": null
          },
          {
            "filterId": "BI_62174baf180c0b000183a7aa",
            "value1": "2022-01-01",
            "value2": "2022-12-31",
            "dateRangeId": null
          },
          {
            "filterId": "BI_62174baf180c0b000183a7ab",
            "value1": "2022-01-01 00:00",
            "value2": "2022-12-31 23:59",
            "dateRangeId": null
          },
          {
            "filterId": "BI_62174baf180c0b000183a7ac",
            "value1": "[{"id":999999,"type":"c"}]",
            "value2": "",
            "dateRangeId": null
          }
        ]
      }
    ],
    "labelAndOptions": [
      {
        "defaultFilterOptionID": null,
        "defaultFilterOptionType": "UDF",
        "label": "Scenario",
        "defaultFilterOptions": [
          {
            "optionName": "All",
            "isDefault": 1,
            "optionID": "BI_59a3e59333b39e09b44e9db1"
          },
          {
            "optionName": "Owned by Me",
            "isDefault": 0,
            "optionID": "BI_59a3e59333b39e09b44e9db2"
          },
          {
            "optionName": "Co-followed by Me",
            "isDefault": 0,
            "optionID": "BI_171714538838884352"
          },
          {
            "optionName": "Served by Me",
            "isDefault": 0,
            "optionID": "BI_171714538872438784"
          },
          {
            "optionName": "Participated by Me",
            "isDefault": 0,
            "optionID": "BI_59a3e59333b39e09b44e9db3"
          },
          {
            "optionName": "Owned by My Department",
            "isDefault": 0,
            "optionID": "BI_59a3e59333b39e09b44e9db4"
          },
          {
            "optionName": "Owned by My Subordinates",
            "isDefault": 0,
            "optionID": "BI_59a3e59333b39e09b44e9db5"
          },
          {
            "optionName": "Co-followed by My Subordinates",
            "isDefault": 0,
            "optionID": "BI_171714538939547648"
          },
          {
            "optionName": "Served by My Subordinates",
            "isDefault": 0,
            "optionID": "BI_171714538973102080"
          },
          {
            "optionName": "Participated by My Subordinates",
            "isDefault": 0,
            "optionID": "BI_59a3e59333b39e09b44e9db6"
          },
          {
            "optionName": "Shared With Me",
            "isDefault": 0,
            "optionID": "BI_59a3e59333b39e09b44e9db7"
          }
        ]
      }
    ]
  }
}

1.5.5 Return value code mapped to the example screenshots

Screenshot: bi access functions guide
Screenshot: bi access functions guide
Field Meaning Sample return value
dataRangeId Required for date filters <pre>"dateRangeId": null </pre>
filterId Filter primary key <pre>"filterId": "BI_62174baf180c0b000183a7a9", </pre>
value1 Default filter range <pre> "value1": "[{"id":999999,"type":"c"}]","value1": "[{"id":999999,"type":"c"}]",</pre>
value2 Default filter range <pre>"value2": "", </pre>
Scenario information (labelAndOptions)
Field Meaning Sample return value
optionName Scenario option name <pre>"optionName": "All" </pre>
isDefault Whether it is the default (1: default) <pre>"isDefault": 1 </pre>
optionID Scenario option ID <pre>"optionID": "BI_59a3e59333b39e09b44e9db1" </pre>
Screenshot: bi access functions guide
Screenshot: bi access functions guide

1.5.6 Function DEMO5

/*Load chart filters*/
++++++++++++++++++++++++++++++++++++++++++++++ Fx.BI.getFiltersResult(<String viewId>)method++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=====================================================================================================================================================
def(isError5,data5,errorMsg5) = Fx.BI.getFiltersResult("BI_62174baf180c0b000183a7a6")
if(!isError5){
  log.info("Filter information: "+data5["filterGroups"])
  log.info("Scenario information: "+data5["labelAndOptions"])
  /*You can modify filter values by FilterId to run queries. Refer to the report runtime parameter structure for the value structure*/
}

1.6 Notes on using filterList: date filter cases and enumeration values

Note: If the filter range is a date filter, you must add a condition to filterList. A date filter without this condition fails.
Example:
"dataRangeId": 6
This value represents the current year. See the following figures for the required enumeration values and descriptions.
Screenshot: bi access functions guide
Screenshot: bi access functions guide
Submit Feedback