Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cấu hình
Chứa các mục cấu hình cho một trình kết nối. Các mục cấu hình này xác định câu hỏi sẽ được đưa ra khi thêm một trình kết nối mới.
constcc=DataStudioApp.createCommunityConnector();constconfig=cc.getConfig();constinfo_entry=config.newInfo().setId('info_id').setHelpText('This connector can connect to multiple data endpoints.');
[[["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\u003eThe \u003ccode\u003eConfig\u003c/code\u003e object defines the configuration entries for a connector, determining the questions asked when adding a new connector.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods for creating various configuration entry types like checkboxes, text inputs, and select lists.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method validates the configuration and returns it in the required format for Data Studio.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003esetDateRangeRequired()\u003c/code\u003e and \u003ccode\u003esetIsSteppedConfig()\u003c/code\u003e methods control whether a date range is provided to data requests and if the configuration is stepped.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods such as \u003ccode\u003eprintJson()\u003c/code\u003e for debugging purposes.\u003c/p\u003e\n"]]],[],null,["# Class Config\n\nConfig\n\nContains the configuration entries for a connector. These configuration entries define what\nquestions are asked when adding a new connector.\n\n```javascript\nconst cc = DataStudioApp.createCommunityConnector();\nconst config = cc.getConfig();\n\nconst info_entry = config.newInfo().setId('info_id').setHelpText(\n 'This connector can connect to multiple data endpoints.');\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------------------|----------------------------------------------------------------------|---------------------------------------------------------------------------------|\n| [build()](#build()) | `Object` | Validates this object and returns it in the format needed by Data Studio. |\n| [newCheckbox()](#newCheckbox()) | [Checkbox](/apps-script/reference/data-studio/checkbox) | Returns a new checkbox configuration entry. |\n| [newInfo()](#newInfo()) | [Info](/apps-script/reference/data-studio/info) | Returns a new info configuration entry. |\n| [newOptionBuilder()](#newOptionBuilder()) | [OptionBuilder](/apps-script/reference/data-studio/option-builder) | Returns a new options builder. |\n| [newSelectMultiple()](#newSelectMultiple()) | [SelectMultiple](/apps-script/reference/data-studio/select-multiple) | Returns a new select multiple configuration entry. |\n| [newSelectSingle()](#newSelectSingle()) | [SelectSingle](/apps-script/reference/data-studio/select-single) | Returns a new select single configuration entry. |\n| [newTextArea()](#newTextArea()) | [TextArea](/apps-script/reference/data-studio/text-area) | Returns a new text area configuration entry. |\n| [newTextInput()](#newTextInput()) | [TextInput](/apps-script/reference/data-studio/text-input) | Returns a new text input configuration entry. |\n| [printJson()](#printJson()) | `String` | Prints the JSON representation of this object. |\n| [setDateRangeRequired(dateRangeRequired)](#setDateRangeRequired(Boolean)) | [Config](#) | If `true`, a date range is provided for getData() requests. |\n| [setIsSteppedConfig(isSteppedConfig)](#setIsSteppedConfig(Boolean)) | [Config](#) | If `true`, `get``Config()` is called again with the current user configuration. |\n\nDetailed documentation\n----------------------\n\n### `build()`\n\nValidates this object and returns it in the format needed by Data Studio.\n\n#### Return\n\n\n`Object` --- The validated [Config](#) object.\n\n*** ** * ** ***\n\n### `new``Checkbox()`\n\nReturns a new checkbox configuration entry.\n\n#### Return\n\n\n[Checkbox](/apps-script/reference/data-studio/checkbox) --- A new checkbox configuration entry.\n\n*** ** * ** ***\n\n### `new``Info()`\n\nReturns a new info configuration entry.\n\n#### Return\n\n\n[Info](/apps-script/reference/data-studio/info) --- A new info configuration entry.\n\n*** ** * ** ***\n\n### `new``Option``Builder()`\n\nReturns a new options builder.\n\n#### Return\n\n\n[OptionBuilder](/apps-script/reference/data-studio/option-builder) --- A new options builder.\n\n*** ** * ** ***\n\n### `new``Select``Multiple()`\n\nReturns a new select multiple configuration entry.\n\n#### Return\n\n\n[SelectMultiple](/apps-script/reference/data-studio/select-multiple) --- A new select multiple configuration entry.\n\n*** ** * ** ***\n\n### `new``Select``Single()`\n\nReturns a new select single configuration entry.\n\n#### Return\n\n\n[SelectSingle](/apps-script/reference/data-studio/select-single) --- A new select single configuration entry.\n\n*** ** * ** ***\n\n### `new``Text``Area()`\n\nReturns a new text area configuration entry.\n\n#### Return\n\n\n[TextArea](/apps-script/reference/data-studio/text-area) --- A new text area configuration entry.\n\n*** ** * ** ***\n\n### `new``Text``Input()`\n\nReturns a new text input configuration entry.\n\n#### Return\n\n\n[TextInput](/apps-script/reference/data-studio/text-input) --- A new text input configuration entry.\n\n*** ** * ** ***\n\n### `print``Json()`\n\nPrints the JSON representation of this object. This is for debugging only.\n\n#### Return\n\n\n`String`\n\n*** ** * ** ***\n\n### `set``Date``Range``Required(dateRangeRequired)`\n\nIf `true`, a date range is provided for getData() requests.\n\n#### Parameters\n\n| Name | Type | Description |\n|-------------------------|-----------|---------------------------------------------------------------------------|\n| `date``Range``Required` | `Boolean` | Whether or not a date range should be provided to `get``Data()` requests. |\n\n#### Return\n\n\n[Config](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n### `set``Is``Stepped``Config(isSteppedConfig)`\n\nIf `true`, `get``Config()` is called again with the current user configuration.\n\n#### Parameters\n\n| Name | Type | Description |\n|-----------------------|-----------|-----------------------------------|\n| `is``Stepped``Config` | `Boolean` | The stepped config status to set. |\n\n#### Return\n\n\n[Config](#) --- This builder, for chaining."]]