Class SelectSingle

Select Single

Contains select single information for the config. Its properties determine how the select single is displayed in Data Studio.

 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 
 . 
 newSelectSingle 
 () 
  
 . 
 setId 
 ( 
 'api_endpoint' 
 ) 
  
 . 
 setName 
 ( 
 'Data Type' 
 ) 
  
 . 
 setHelpText 
 ( 
 'Select the data type you\'re interested in.' 
 ) 
  
 . 
 setAllowOverride 
 ( 
 true 
 ) 
  
 . 
 addOption 
 ( 
 option1 
 ) 
  
 . 
 addOption 
 ( 
 option2 
 ); 

Methods

Method Return type Brief description
Select Single Adds a new select option.
Select Single Enables overriding for this config entry.
Select Single Sets the help text for this configuration entry.
Select Single Sets the unique ID for this configuration entry.
Select Single Sets the dynamic status for this configuration entry.
Select Single Sets the display name for this configuration entry.

Detailed documentation

add Option(optionBuilder)

Adds a new select option.

Parameters

Name Type Description
option Builder
Option Builder A builder for an option.

Return

Select Single — This builder, for chaining.


set Allow Override(allowOverride)

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

Parameters

Name Type Description
allow Override
Boolean Whether or not this config entry can be overridden in reports.

Return

Select Single — This builder, for chaining.


set Help Text(helpText)

Sets the help text for this configuration entry.

Parameters

Name Type Description
help Text
String The helpText to set.

Return

Select Single — This builder, for chaining.


set Id(id)

Sets the unique ID for this configuration entry.

Parameters

Name Type Description
id
String The ID to set.

Return

Select Single — This builder, for chaining.


set Is Dynamic(isDynamic)

Sets the dynamic status for this configuration entry.

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

Parameters

Name Type Description
is Dynamic
Boolean The dynamic status to set.

Return

Select Single — This builder, for chaining.


set Name(name)

Sets the display name for this configuration entry.

Parameters

Name Type Description
name
String The name to set.

Return

Select Single — This builder, for chaining.

Create a Mobile Website
View Site in Mobile | Classic
Share by: