Class TextInput
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Entrada detexto
Contém informações de entrada de texto para a configuração. As propriedades determinam como a entrada de texto é
exibida no Data Studio.
const cc = DataStudioApp.createCommunityConnector();
const config = cc.getConfig();
const info1 = config.newTextInput()
.setId('info1')
.setName('Search')
.setHelpText('for example, Coldplay')
.setAllowOverride(true)
.setPlaceholder('Search for an artist for all songs.');
Documentação detalhada
setAllowOverride(allowOverride)
Permite substituir esta entrada de configuração. Quando definido como true
, os criadores de fontes de dados têm a opção de ativar esse recurso para os editores de relatórios.
Parâmetros
Nome | Tipo | Descrição |
allowOverride | Boolean | Se essa entrada de configuração pode ser substituída nos relatórios. |
Retornar
TextInput
: este builder, para encadeamento.
setHelpText(helpText)
Define o texto de ajuda para essa entrada de configuração.
Parâmetros
Nome | Tipo | Descrição |
helpText | String | O helpText a ser definido. |
Retornar
TextInput
: este builder, para encadeamento.
setId(id)
Define o ID exclusivo para essa entrada de configuração.
Parâmetros
Nome | Tipo | Descrição |
id | String | O ID a ser definido. |
Retornar
TextInput
: este builder, para encadeamento.
setIsDynamic(isDynamic)
Define o status dinâmico para esta entrada de configuração.
Se uma entrada de configuração dinâmica for modificada, as entradas de configuração subsequentes serão apagadas.
Parâmetros
Nome | Tipo | Descrição |
isDynamic | Boolean | O status dinâmico a ser definido. |
Retornar
TextInput
: este builder, para encadeamento.
setName(name)
Define o nome de exibição para essa entrada de configuração.
Parâmetros
Nome | Tipo | Descrição |
name | String | O nome a ser definido. |
Retornar
TextInput
: este builder, para encadeamento.
setPlaceholder(placeholder)
Define o texto do marcador de posição para esta entrada de configuração.
Parâmetros
Nome | Tipo | Descrição |
placeholder | String | O texto do marcador de posição a ser definido. |
Retornar
TextInput
: este builder, para encadeamento.
Exceto em caso de indicação contrária, o conteúdo desta página é licenciado de acordo com a Licença de atribuição 4.0 do Creative Commons, e as amostras de código são licenciadas de acordo com a Licença Apache 2.0. Para mais detalhes, consulte as políticas do site do Google Developers. Java é uma marca registrada da Oracle e/ou afiliadas.
Última atualização 2025-07-26 UTC.
[null,null,["Última atualização 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eTextInput\u003c/code\u003e objects are used to collect text input within a Data Studio configuration.\u003c/p\u003e\n"],["\u003cp\u003eThese objects allow you to define the input's label (\u003ccode\u003esetName\u003c/code\u003e), placeholder text (\u003ccode\u003esetPlaceholder\u003c/code\u003e), help text (\u003ccode\u003esetHelpText\u003c/code\u003e), and more.\u003c/p\u003e\n"],["\u003cp\u003eYou can control whether users can override the input's value (\u003ccode\u003esetAllowOverride\u003c/code\u003e) and whether it dynamically affects other configuration options (\u003ccode\u003esetIsDynamic\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eEvery \u003ccode\u003eTextInput\u003c/code\u003e needs a unique identifier set using the \u003ccode\u003esetId\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# Class TextInput\n\nTextInput\n\nContains text input information for the config. Its properties determine how the text input is\ndisplayed in Data Studio.\n\n```javascript\nconst cc = DataStudioApp.createCommunityConnector();\nconst config = cc.getConfig();\n\nconst info1 = config.newTextInput()\n .setId('info1')\n .setName('Search')\n .setHelpText('for example, Coldplay')\n .setAllowOverride(true)\n .setPlaceholder('Search for an artist for all songs.');\n``` \n\n### Methods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------|----------------|---------------------------------------------------------|\n| [setAllowOverride(allowOverride)](#setAllowOverride(Boolean)) | [TextInput](#) | Enables overriding for this config entry. |\n| [setHelpText(helpText)](#setHelpText(String)) | [TextInput](#) | Sets the help text for this configuration entry. |\n| [setId(id)](#setId(String)) | [TextInput](#) | Sets the unique ID for this configuration entry. |\n| [setIsDynamic(isDynamic)](#setIsDynamic(Boolean)) | [TextInput](#) | Sets the dynamic status for this configuration entry. |\n| [setName(name)](#setName(String)) | [TextInput](#) | Sets the display name for this configuration entry. |\n| [setPlaceholder(placeholder)](#setPlaceholder(String)) | [TextInput](#) | Sets the placeholder text 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[TextInput](#) --- 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[TextInput](#) --- 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[TextInput](#) --- 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[TextInput](#) --- 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[TextInput](#) --- This builder, for chaining.\n\n*** ** * ** ***\n\n### `set``Placeholder(placeholder)`\n\nSets the placeholder text for this configuration entry.\n\n#### Parameters\n\n| Name | Type | Description |\n|---------------|----------|------------------------------|\n| `placeholder` | `String` | The placeholder text to set. |\n\n#### Return\n\n\n[TextInput](#) --- This builder, for chaining."]]