Class SelectMultiple
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mehrere auswählen
Enthält mehrere ausgewählte Informationen für die Konfiguration. Mit den Eigenschaften wird festgelegt, wie die Auswahlliste in Data Studio angezeigt wird.
Verwendung:
const cc = DataStudioApp.createCommunityConnector();
const config = cc.getConfig();
const option1 =
config.newOptionBuilder().setLabel('option label').setValue('option_value');
const option2 = config.newOptionBuilder()
.setLabel('second option label')
.setValue('option_value_2');
const info1 = config.newSelectMultiple()
.setId('api_endpoint')
.setName('Data Type')
.setHelpText('Select the data type you\'re interested in.')
.setAllowOverride(true)
.addOption(option1)
.addOption(option2);
Detaillierte Dokumentation
addOption(optionBuilder)
Es wird eine neue Auswahloption hinzugefügt.
Parameter
Name | Typ | Beschreibung |
optionBuilder | OptionBuilder | Ein Builder für eine Option. |
Rückflug
SelectMultiple
– Dieser Builder zur Verkettung.
setAllowOverride(allowOverride)
Aktiviert das Überschreiben für diesen Konfigurationseintrag. Wenn true
festgelegt ist, können die Ersteller von Datenquellen diese Option für Mitbearbeiter von Berichten aktivieren.
Parameter
Name | Typ | Beschreibung |
allowOverride | Boolean | Gibt an, ob dieser Konfigurationseintrag in Berichten überschrieben werden kann. |
Rückflug
SelectMultiple
– Dieser Builder zur Verkettung.
setHelpText(helpText)
Hiermit wird der Hilfetext für diesen Konfigurationseintrag festgelegt.
Parameter
Name | Typ | Beschreibung |
helpText | String | Der Hilfetext, der festgelegt werden soll. |
Rückflug
SelectMultiple
– Dieser Builder zur Verkettung.
setId(id)
Hier wird die eindeutige ID für diesen Konfigurationseintrag festgelegt.
Parameter
Name | Typ | Beschreibung |
id | String | Die ID, die festgelegt werden soll. |
Rückflug
SelectMultiple
– Dieser Builder zur Verkettung.
setIsDynamic(isDynamic)
Hier wird der dynamische Status für diesen Konfigurationseintrag festgelegt.
Wenn ein dynamischer Konfigurationseintrag geändert wird, werden nachfolgende Konfigurationseinträge gelöscht.
Parameter
Name | Typ | Beschreibung |
isDynamic | Boolean | Der festzulegende dynamische Status. |
Rückflug
SelectMultiple
– Dieser Builder zur Verkettung.
setName(name)
Legt den Anzeigenamen für diesen Konfigurationseintrag fest.
Parameter
Name | Typ | Beschreibung |
name | String | Der Name, der festgelegt werden soll. |
Rückflug
SelectMultiple
– Dieser Builder zur Verkettung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003e\u003ccode\u003eSelectMultiple\u003c/code\u003e defines how a multi-select dropdown appears in Data Studio, allowing users to choose multiple options from a list.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use methods like \u003ccode\u003eaddOption\u003c/code\u003e, \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 to customize the select multiple element.\u003c/p\u003e\n"],["\u003cp\u003eEach option in the select multiple is built using \u003ccode\u003eOptionBuilder\u003c/code\u003e to set labels and values.\u003c/p\u003e\n"],["\u003cp\u003eConfiguration options like allowing overrides, providing help text, and setting a dynamic status further refine the behavior of the select multiple element.\u003c/p\u003e\n"]]],["The `SelectMultiple` config allows defining how multiple selections are displayed in Data Studio. Key actions include: adding options using `addOption()`, setting override permissions with `setAllowOverride()`, providing help text via `setHelpText()`, and establishing a unique ID with `setId()`. You can control the dynamic behavior using `setIsDynamic()`. Furthermore, the display name is set by `setName()`, all allowing chaining. This is exemplified by the creation of a new multiple select config with two options in the code.\n"],null,["# Class SelectMultiple\n\nSelectMultiple\n\nContains select multiple information for the config. Its properties determine how the select\nmultiple is displayed in Data Studio.\n\nUsage:\n\n```javascript\nconst cc = DataStudioApp.createCommunityConnector();\nconst config = cc.getConfig();\nconst option1 =\n config.newOptionBuilder().setLabel('option label').setValue('option_value');\n\nconst option2 = config.newOptionBuilder()\n .setLabel('second option label')\n .setValue('option_value_2');\n\nconst info1 = config.newSelectMultiple()\n .setId('api_endpoint')\n .setName('Data Type')\n .setHelpText('Select the data type you\\'re interested in.')\n .setAllowOverride(true)\n .addOption(option1)\n .addOption(option2);\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------|---------------------|-------------------------------------------------------|\n| [addOption(optionBuilder)](#addOption(OptionBuilder)) | [SelectMultiple](#) | Adds a new select option. |\n| [setAllowOverride(allowOverride)](#setAllowOverride(Boolean)) | [SelectMultiple](#) | Enables overriding for this config entry. |\n| [setHelpText(helpText)](#setHelpText(String)) | [SelectMultiple](#) | Sets the help text for this configuration entry. |\n| [setId(id)](#setId(String)) | [SelectMultiple](#) | Sets the unique ID for this configuration entry. |\n| [setIsDynamic(isDynamic)](#setIsDynamic(Boolean)) | [SelectMultiple](#) | Sets the dynamic status for this configuration entry. |\n| [setName(name)](#setName(String)) | [SelectMultiple](#) | Sets the display name for this configuration entry. |\n\nDetailed documentation\n----------------------\n\n### `add``Option(optionBuilder)`\n\nAdds a new select option.\n\n#### Parameters\n\n| Name | Type | Description |\n|-------------------|--------------------------------------------------------------------|--------------------------|\n| `option``Builder` | [OptionBuilder](/apps-script/reference/data-studio/option-builder) | A builder for an option. |\n\n#### Return\n\n\n[SelectMultiple](#) --- This builder, for chaining.\n\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[SelectMultiple](#) --- 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 help text to set. |\n\n#### Return\n\n\n[SelectMultiple](#) --- 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[SelectMultiple](#) --- 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[SelectMultiple](#) --- 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[SelectMultiple](#) --- This builder, for chaining."]]