[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eGetDataResponse\u003c/code\u003e helps structure the data your script returns to Data Studio for visualization.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods like \u003ccode\u003eaddRow\u003c/code\u003e, \u003ccode\u003eaddAllRows\u003c/code\u003e, and \u003ccode\u003esetFields\u003c/code\u003e to define the data structure and content.\u003c/p\u003e\n"],["\u003cp\u003eUse \u003ccode\u003ebuild()\u003c/code\u003e to finalize and send the data to Data Studio in the correct format.\u003c/p\u003e\n"],["\u003cp\u003eYou can signal if Data Studio filters were applied using \u003ccode\u003esetFiltersApplied\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["GetDataResponse\n\nBuilder to create a `get``Data()` response for your script project.\n\n```javascript\nfunction getFields() {\n //...\n}\n\nfunction getData() {\n const cc = DataStudioApp.createCommunityConnector();\n\n return cc.newGetDataResponse()\n .setFields(getFields())\n .addRow(['3', 'Foobar.com'])\n .addRow(['4', 'Foobaz.com'])\n .addRows([\n ['5', 'Fizzbuz.com'],\n ['6', 'Fizzbaz.com'],\n ])\n .build();\n}\n``` \n\nMethods\n\n| Method | Return type | Brief description |\n|------------------------------------------------------------------|----------------------|------------------------------------------------------------------------------|\n| [addAllRows(rows)](#addAllRows(String)) | [GetDataResponse](#) | Adds multiple rows of data to this [GetDataResponse](#). |\n| [addRow(row)](#addRow(String)) | [GetDataResponse](#) | Adds a row of data to this [GetDataResponse](#). |\n| [build()](#build()) | `Object` | Validates this object and returns it in the format needed by Data Studio. |\n| [setFields(fields)](#setFields(Fields)) | [GetDataResponse](#) | Sets the [Fields](/apps-script/reference/data-studio/fields) of the builder. |\n| [setFiltersApplied(filtersApplied)](#setFiltersApplied(Boolean)) | [GetDataResponse](#) | Sets the filters applied status for this builder. |\n\nDetailed documentation \n\n`add``All``Rows(rows)` \nAdds multiple rows of data to this [GetDataResponse](#).\n\nParameters\n\n| Name | Type | Description |\n|--------|--------------|--------------------------|\n| `rows` | `String[][]` | The rows of data to set. |\n\nReturn\n\n\n[GetDataResponse](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n`add``Row(row)` \nAdds a row of data to this [GetDataResponse](#).\n\nParameters\n\n| Name | Type | Description |\n|-------|------------|-------------------------|\n| `row` | `String[]` | The row of data to set. |\n\nReturn\n\n\n[GetDataResponse](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n`build()` \nValidates this object and returns it in the format needed by Data Studio.\n\nReturn\n\n\n`Object` --- The validated [GetDataResponse](#) object.\n\n*** ** * ** ***\n\n`set``Fields(fields)` \nSets the [Fields](/apps-script/reference/data-studio/fields) of the builder.\n\nParameters\n\n| Name | Type | Description |\n|----------|-----------------------------------------------------|--------------------|\n| `fields` | [Fields](/apps-script/reference/data-studio/fields) | The fields to set. |\n\nReturn\n\n\n[GetDataResponse](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n`set``Filters``Applied(filtersApplied)` \nSets the filters applied status for this builder. Set to `true` if all filters were\nsuccessfully applied, `false` otherwise.\n\nParameters\n\n| Name | Type | Description |\n|--------------------|-----------|--------------------------------------|\n| `filters``Applied` | `Boolean` | - The filters applied status to set. |\n\nReturn\n\n\n[GetDataResponse](#) --- This builder, for chaining."]]