---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# TransformResult - Scoped, Global

# TransformResult - Scoped, Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The TransformResult API provides methods that return the result of a
transformation run on time-series data.

You can use this API in both scoped and global server scripts. When using the
Transformer class in a scoped application, use the
`sn_clotho` namespace identifier.

There is no constructor for this class. TransformResult objects are returned by many
TransformPart methods.

This class is part of the MetricBase application.

## TransformResult - byGroup() {#ariaid-title2}

Returns an array of Data objects. Returns an error if no group was specified for the
transform.
{#TR-byGroup__table_jh4_qby_mbb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#TR-byGroup__table_jh4_qby_mbb} {#TR-byGroup__table_kh4_qby_mbb__entry__2}

| Type | Description |
|-|-|
| Array | An array of Data objects, with each object corresponding to a group. |
[Table 2. Returns]

{#TR-byGroup__table_kh4_qby_mbb}

## TransformResult - getByLabel(String label) {#ariaid-title3}

Returns the transformed data with the specified label.
{#TR-getByLabel_S__table_rfy_2yx_mbb__entry__3}

| Name | Type | Description |
|-|-|-|
| label | String | The label that identifies the data to be retrieved. |
[Table 3. Parameters]

{#TR-getByLabel_S__table_rfy_2yx_mbb} {#TR-getByLabel_S__table_sfy_2yx_mbb__entry__2}

| Type | Description |
|-|-|
| Data | The Data object with the transform results. |
[Table 4. Returns]

{#TR-getByLabel_S__table_sfy_2yx_mbb}

## TransformResult - getData() {#ariaid-title4}

Returns a single Data object, or null if the result is empty.
{#TR-getData__table_xzw_y1y_mbb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 5. Parameters]

{#TR-getData__table_xzw_y1y_mbb} {#TR-getData__table_yzw_y1y_mbb__entry__2}

| Type | Description |
|-|-|
| Data | The Data object with the transform results. |
[Table 6. Returns]

{#TR-getData__table_yzw_y1y_mbb}

## TransformResult - toArray() {#ariaid-title5}

Returns the transformed data as an array. This method turns a Data object into an
array.
{#TR-toArray__table_dbv_f1y_mbb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 7. Parameters]

{#TR-toArray__table_dbv_f1y_mbb} {#TR-toArray__table_ebv_f1y_mbb__entry__2}

| Type | Description |
|-|-|
| Array | The Data object formatted as an array. |
[Table 8. Returns]

{#TR-toArray__table_ebv_f1y_mbb}

