Class Checkbox
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
核取方塊包含設定檔的核取方塊資訊。其屬性會決定核取方塊在數據分析中的顯示方式。
const config = DataStudioApp.createCommunityConnector().getConfig();
const checkbox = config.newCheckbox()
.setId('use_https')
.setName('Use Https?')
.setHelpText('Whether or not https should be used.')
.setAllowOverride(true);
內容詳盡的說明文件
setAllowOverride(allowOverride)
啟用此設定項目的覆寫功能。如果設為 true
,資料來源建立者可以選擇為報表編輯者啟用這項功能。
參數
名稱 | 類型 | 說明 |
allowOverride | Boolean | 報表中是否可覆寫此設定項目。 |
回攻員
Checkbox
:這個建構工具可用於鏈結。
setHelpText(helpText)
設定此設定項目的說明文字。
參數
名稱 | 類型 | 說明 |
helpText | String | 要設定的 helpText。 |
回攻員
Checkbox
:這個建構工具可用於鏈結。
setId(id)
設定此設定項目的專屬 ID。
參數
回攻員
Checkbox
:這個建構工具可用於鏈結。
setIsDynamic(isDynamic)
設定這項設定項目的動態狀態。
如果動態設定項目遭到修改,後續的設定項目就會清除。
參數
名稱 | 類型 | 說明 |
isDynamic | Boolean | 要設定的動態狀態。 |
回攻員
Checkbox
:這個建構工具可用於鏈結。
setName(name)
設定這個設定項目的顯示名稱。
參數
回攻員
Checkbox
:這個建構工具可用於鏈結。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eCheckbox\u003c/code\u003e object configures checkbox properties for display in Data Studio.\u003c/p\u003e\n"],["\u003cp\u003eKey properties include ID, name, help text, and override settings, all set using designated methods.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003esetAllowOverride\u003c/code\u003e, \u003ccode\u003esetHelpText\u003c/code\u003e, \u003ccode\u003esetId\u003c/code\u003e, \u003ccode\u003esetIsDynamic\u003c/code\u003e, and \u003ccode\u003esetName\u003c/code\u003e allow customization of the checkbox's functionality and appearance.\u003c/p\u003e\n"],["\u003cp\u003eEach method takes specific parameters, like \u003ccode\u003eallowOverride\u003c/code\u003e (boolean), \u003ccode\u003ehelpText\u003c/code\u003e (string), and \u003ccode\u003eid\u003c/code\u003e (string), to define the checkbox's behavior and presentation.\u003c/p\u003e\n"],["\u003cp\u003eAll Checkbox methods return the Checkbox object itself, enabling chained method calls for efficient configuration.\u003c/p\u003e\n"]]],[],null,["# Class Checkbox\n\nCheckbox\n\nContains checkbox information for the config. Its properties determine how the checkbox is\ndisplayed in Data Studio.\n\n```javascript\nconst config = DataStudioApp.createCommunityConnector().getConfig();\nconst checkbox = config.newCheckbox()\n .setId('use_https')\n .setName('Use Https?')\n .setHelpText('Whether or not https should be used.')\n .setAllowOverride(true);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------|---------------|-------------------------------------------------------|\n| [setAllowOverride(allowOverride)](#setAllowOverride(Boolean)) | [Checkbox](#) | Enables overriding for this config entry. |\n| [setHelpText(helpText)](#setHelpText(String)) | [Checkbox](#) | Sets the help text for this configuration entry. |\n| [setId(id)](#setId(String)) | [Checkbox](#) | Sets the unique ID for this configuration entry. |\n| [setIsDynamic(isDynamic)](#setIsDynamic(Boolean)) | [Checkbox](#) | Sets the dynamic status for this configuration entry. |\n| [setName(name)](#setName(String)) | [Checkbox](#) | Sets the display name for this configuration entry. |\n\nDetailed documentation\n----------------------\n\n### `set``Allow``Override(allowOverride)`\n\nEnables overriding for this config entry. If set to `true`, data source creators have the\noption to enable this for report editors.\n\n#### Parameters\n\n| Name | Type | Description |\n|-------------------|-----------|----------------------------------------------------------------|\n| `allow``Override` | `Boolean` | Whether or not this config entry can be overridden in reports. |\n\n#### Return\n\n\n[Checkbox](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n### `set``Help``Text(helpText)`\n\nSets the help text for this configuration entry.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------------|----------|----------------------|\n| `help``Text` | `String` | The helpText to set. |\n\n#### Return\n\n\n[Checkbox](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n### `set``Id(id)`\n\nSets the unique ID for this configuration entry.\n\n#### Parameters\n\n| Name | Type | Description |\n|------|----------|----------------|\n| `id` | `String` | The ID to set. |\n\n#### Return\n\n\n[Checkbox](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n### `set``Is``Dynamic(isDynamic)`\n\nSets the dynamic status for this configuration entry.\n\nIf a dynamic configuration entry is modified, subsequent configuration entries are cleared.\n\n#### Parameters\n\n| Name | Type | Description |\n|---------------|-----------|----------------------------|\n| `is``Dynamic` | `Boolean` | The dynamic status to set. |\n\n#### Return\n\n\n[Checkbox](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n### `set``Name(name)`\n\nSets the display name for this configuration entry.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------|----------|------------------|\n| `name` | `String` | The name to set. |\n\n#### Return\n\n\n[Checkbox](#) --- This builder, for chaining."]]