Class TextInput

  • TextInput objects are used to collect text input within a Data Studio configuration.

  • These objects allow you to define the input's label (setName), placeholder text (setPlaceholder), help text (setHelpText), and more.

  • You can control whether users can override the input's value (setAllowOverride) and whether it dynamically affects other configuration options (setIsDynamic).

  • Every TextInput needs a unique identifier set using the setId method.

TextInput

Contains text input information for the config. Its properties determine how the text input is displayed in 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.');

Methods

MethodReturn typeBrief description
setAllowOverride(allowOverride)TextInputEnables overriding for this config entry.
setHelpText(helpText)TextInputSets the help text for this configuration entry.
setId(id)TextInputSets the unique ID for this configuration entry.
setIsDynamic(isDynamic)TextInputSets the dynamic status for this configuration entry.
setName(name)TextInputSets the display name for this configuration entry.
setPlaceholder(placeholder)TextInputSets the placeholder text for this configuration entry.

Detailed documentation

setAllowOverride(allowOverride)

Enables overriding for this config entry. If set to true, data source creators have the option to enable this for report editors

Parameters

NameTypeDescription
allowOverrideBooleanWhether or not this config entry can be overridden in reports.

Return

TextInput — This builder, for chaining.


setHelpText(helpText)

Sets the help text for this configuration entry.

Parameters

NameTypeDescription
helpTextStringThe helpText to set.

Return

TextInput — This builder, for chaining.


setId(id)

Sets the unique ID for this configuration entry.

Parameters

NameTypeDescription
idStringThe ID to set.

Return

TextInput — This builder, for chaining.


setIsDynamic(isDynamic)

Sets the dynamic status for this configuration entry.

If a dynamic configuration entry is modified, subsequent configuration entries are cleared.

Parameters

NameTypeDescription
isDynamicBooleanThe dynamic status to set.

Return

TextInput — This builder, for chaining.


setName(name)

Sets the display name for this configuration entry.

Parameters

NameTypeDescription
nameStringThe name to set.

Return

TextInput — This builder, for chaining.


setPlaceholder(placeholder)

Sets the placeholder text for this configuration entry.

Parameters

NameTypeDescription
placeholderStringThe placeholder text to set.

Return

TextInput — This builder, for chaining.