Class DynamicResourceDefinition

Dynamic Resource Definition

A DynamicResourceDefinition is a building block for a Resource Fields Definition Retrieved Action , it can contain one or more numbers of Resource Field to dynamically define the number of output variables provided by a step in Google Workspace Studio.

Only available for Google Workspace add-ons that extend Google Workspace Studio.

Sample usage:

 let 
  
 dynamicResourceDefinition 
  
 = 
  
 AddOnsResponseService 
 . 
 newDynamicResourceDefinition 
 () 
  
 . 
 setResourceId 
 ( 
 "resource_definition_1" 
 ) 
  
 // The resource ID must match the one defined in the manifest. 
  
 . 
 addResourceField 
 ( 
  
 AddOnsResponseService 
 . 
 newResourceField 
 () 
  
 . 
 setSelector 
 ( 
 "question_1" 
 ) 
  
 . 
 setDisplayText 
 ( 
 "Question 1" 
 ) 
  
 ); 

Methods

Method Return type Brief description
Dynamic Resource Definition Adds a resource field to the dynamic resource definition.
Dynamic Resource Definition Sets the ID for the dynamic resource definition, this ID corresponds to the workflow Resource Definition Id in the manifest.

Detailed documentation

add Resource Field(resourceField)

Adds a resource field to the dynamic resource definition.

Parameters

Name Type Description
resource Field
Resource Field The resource field to add.

Return

Dynamic Resource Definition — This object, for chaining.


set Resource Id(resourceId)

Sets the ID for the dynamic resource definition, this ID corresponds to the workflow Resource Definition Id in the manifest.

Parameters

Name Type Description
resource Id
String The unique identifier for the dynamic resource definition.

Return

Dynamic Resource Definition — This object, for chaining.

Design a Mobile Site
View Site in Mobile | Classic
Share by: